Enable Capybara/CurrentPathExpectation cop & fix issues
Read cop description http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Capybara/CurrentPathExpectation to better understand reasons behind enforcing this rule On some cases the `only_path: true` was needed as argument of `have_current_path` matcher to avoid comparing the url parameters and just checking the path.
This commit is contained in:
@@ -103,7 +103,7 @@ feature "Home" do
|
||||
visit root_path
|
||||
click_on debate.title
|
||||
|
||||
expect(current_path).to eq debate_path(debate)
|
||||
expect(page).to have_current_path(debate_path(debate))
|
||||
end
|
||||
|
||||
scenario 'Do not display recommended section when there are not debates and proposals' do
|
||||
|
||||
Reference in New Issue
Block a user