From 8fb9be9d0782109d594ed1aca68eb61713dcd9a6 Mon Sep 17 00:00:00 2001 From: rgarcia Date: Tue, 16 Jan 2018 00:00:52 +0100 Subject: [PATCH] Fix RSpec's `should` deprecation warning Using `stub` from rspec-mocks' old `:should` syntax without explicitly enabling the syntax is deprecated. Use the new `:expect` syntax or explicitly enable `:should` instead --- spec/features/polls/voter_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/features/polls/voter_spec.rb b/spec/features/polls/voter_spec.rb index 396b18341..75406ccca 100644 --- a/spec/features/polls/voter_spec.rb +++ b/spec/features/polls/voter_spec.rb @@ -29,7 +29,7 @@ feature "Voter" do expect(page).not_to have_link(answer_yes.title) end - expect(find(:css, ".js-token-message")).to be_visible + expect(page).to have_css(".js-token-message", visible: true) token = find(:css, ".js-question-answer")[:href].gsub(/.+?(?=token)/, '').gsub('token=', '') expect(page).to have_content "You can write down this vote identifier, to check your vote on the final results: #{token}"