Enable RSpec/MessageExpectation cop & fix issues
There was 34 `allow` occurences and 17 `expect` occurences, so to be consistent `allow` form was chosen. Read about cop at http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/MessageExpectation
This commit is contained in:
@@ -34,7 +34,7 @@ feature 'Localization' do
|
||||
end
|
||||
|
||||
scenario 'Locale switcher not present if only one locale' do
|
||||
expect(I18n).to receive(:available_locales).and_return([:en])
|
||||
allow(I18n).to receive(:available_locales).and_return([:en])
|
||||
|
||||
visit '/'
|
||||
expect(page).to_not have_content('Language')
|
||||
|
||||
@@ -39,10 +39,10 @@ feature 'Localization' do
|
||||
end
|
||||
|
||||
scenario 'Locale switcher not present if only one locale' do
|
||||
expect(I18n).to receive(:available_locales).and_return([:en])
|
||||
allow(I18n).to receive(:available_locales).and_return([:en])
|
||||
|
||||
visit management_root_path
|
||||
expect(page).to_not have_content('Language')
|
||||
expect(page).to_not have_css('div.locale')
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user