Skip to content

Commit 5f677df

Browse files
author
Mattia Roccoberton
committed
Fix RuboCop issues
1 parent 1e1af9c commit 5f677df

File tree

4 files changed

+21
-39
lines changed

4 files changed

+21
-39
lines changed

.rubocop.yml

Lines changed: 4 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -18,27 +18,9 @@ AllCops:
1818
- vendor/**/*
1919
NewCops: enable
2020

21-
Gemspec/RequiredRubyVersion:
22-
Enabled: false
23-
24-
Naming/FileName:
25-
Enabled: false
26-
27-
Layout/LineLength:
28-
Enabled: true
29-
Max: 120
21+
Style/OpenStructUse:
22+
Enabled: false # TODO: fix me
3023

3124
RSpec/ExampleLength:
32-
Max: 8
33-
34-
RSpec/MultipleExpectations:
35-
Max: 5
36-
37-
Style/HashEachMethods:
38-
Enabled: true
39-
40-
Style/HashTransformKeys:
41-
Enabled: true
42-
43-
Style/HashTransformValues:
44-
Enabled: true
25+
# default 5
26+
Max: 10

spec/system/authors_spec.rb

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# frozen_string_literal: true
22

33
RSpec.describe 'Authors', type: :system do
4-
it 'fails to create an author', :vcr do
4+
it 'fails to create an author', :aggregate_failures, :vcr do
55
visit '/admin/authors/new'
66

77
fill_in('author[name]', with: 'Boh')
@@ -13,7 +13,7 @@
1313
expect(error).to include 'Invalid email'
1414
end
1515

16-
it 'creates an author', :vcr do
16+
it 'creates an author', :aggregate_failures, :vcr do
1717
visit '/admin/authors/new'
1818

1919
fill_in('author[name]', with: 'Some name')
@@ -26,21 +26,21 @@
2626
end
2727

2828
context 'with some authors' do
29-
it 'loads the authors list', :vcr do
29+
it 'loads the authors list', :aggregate_failures, :vcr do
3030
visit '/admin/authors'
3131

3232
expect(page).to have_http_status(:success)
3333
expect(page).to have_css('#index_table_authors td.col-name', count: 4)
3434
end
3535

36-
it 'loads an author', :vcr do
36+
it 'loads an author', :aggregate_failures, :vcr do
3737
visit '/admin/authors/1'
3838

3939
expect(page).to have_http_status(:success)
4040
expect(page).to have_css('#attributes_table_author_1')
4141
end
4242

43-
it 'fails to update an author', :vcr do
43+
it 'fails to update an author', :aggregate_failures, :vcr do
4444
visit '/admin/authors/1/edit'
4545

4646
fill_in('author[name]', with: '')
@@ -51,7 +51,7 @@
5151
expect(error).to include "is too short"
5252
end
5353

54-
it 'updates an author', :vcr do
54+
it 'updates an author', :aggregate_failures, :vcr do
5555
visit '/admin/authors/1/edit'
5656

5757
fill_in('author[age]', with: '30')
@@ -61,7 +61,7 @@
6161
expect(page).to have_content('Author was successfully updated.')
6262
end
6363

64-
it 'destroys an author', :vcr do
64+
it 'destroys an author', :aggregate_failures, :vcr do
6565
visit '/admin/authors'
6666

6767
find_all('.delete_link.member_link').last.click

spec/system/posts_spec.rb

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# frozen_string_literal: true
22

33
RSpec.describe 'Posts', type: :system do
4-
it 'fails to create a post', :vcr do
4+
it 'fails to create a post', :aggregate_failures, :vcr do
55
visit '/admin/posts/new'
66

77
fill_in('post[title]', with: '')
@@ -13,7 +13,7 @@
1313
end
1414

1515
context 'with some authors' do
16-
it 'creates a post', :vcr do
16+
it 'creates a post', :aggregate_failures, :vcr do
1717
visit '/admin/posts/new'
1818

1919
fill_in('post[title]', with: 'Some title')
@@ -26,21 +26,21 @@
2626
end
2727

2828
context 'with some posts' do
29-
it 'loads the posts list', :vcr do
29+
it 'loads the posts list', :aggregate_failures, :vcr do
3030
visit '/admin/posts'
3131

3232
expect(page).to have_http_status(:success)
3333
expect(page).to have_css('#index_table_posts td.col-title', count: 3)
3434
end
3535

36-
it 'loads a post', :vcr do
36+
it 'loads a post', :aggregate_failures, :vcr do
3737
visit '/admin/posts/1'
3838

3939
expect(page).to have_http_status(:success)
4040
expect(page).to have_css('#attributes_table_post_1')
4141
end
4242

43-
it 'fails to update a post', :vcr do
43+
it 'fails to update a post', :aggregate_failures, :vcr do
4444
visit '/admin/posts/1/edit'
4545

4646
fill_in('post[title]', with: '')
@@ -51,7 +51,7 @@
5151
expect(error).to include "is too short"
5252
end
5353

54-
it 'updates a post', :vcr do
54+
it 'updates a post', :aggregate_failures, :vcr do
5555
visit '/admin/posts/1/edit'
5656

5757
fill_in('post[description]', with: 'Some desc')
@@ -61,7 +61,7 @@
6161
expect(page).to have_content('Post was successfully updated.')
6262
end
6363

64-
it 'destroys a post', :vcr do
64+
it 'destroys a post', :aggregate_failures, :vcr do
6565
visit '/admin/posts'
6666

6767
find_all('.delete_link.member_link').last.click

spec/system/tags_spec.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22

33
RSpec.describe 'Tags', type: :system do
44
context 'with some tags' do
5-
it 'loads the tags list', :vcr do
5+
it 'loads the tags list', :aggregate_failures, :vcr do
66
visit '/admin/tags'
77

88
expect(page).to have_http_status(:success)
99
expect(page).to have_css('#index_table_tags td.col-name', count: 5)
1010
end
1111

12-
it 'filters the tags', :vcr do
12+
it 'filters the tags', :aggregate_failures, :vcr do
1313
visit '/admin/tags'
1414

1515
fill_in('q[name_cont]', with: 'Some tag')
@@ -19,7 +19,7 @@
1919
expect(name.text).to eq 'Some tag'
2020
end
2121

22-
it 'loads a tag', :vcr do
22+
it 'loads a tag', :aggregate_failures, :vcr do
2323
visit '/admin/tags/1'
2424

2525
expect(page).to have_http_status(:success)

0 commit comments

Comments
 (0)