i'm using following:
minitest 5.3.5
cucumber 1.3.15
capybara 2.3.0
capybara_minitest_spec 1.0.2
rails 4.1.1
cucumber-rails 1.4.1
and my cucumber/capybara code
Then(/^I should see "(.*?)"$/) do |string|
page.has_content?(string)
end
with any string, independent is it on the page or not returns true. I've tried to use capybara_minitest_spec gem and my code becomes
Then(/^I should see "(.*?)"$/) do |string|
page.must_have_content(string)
end
then i've got error
Then I should see "Test" # features/step_definitions/pages_steps.rb:9
undefined method `assert_page_has_content' for nil:NilClass (NoMethodError)
(eval):4:in `must_have_content'
./features/step_definitions/pages_steps.rb:10:in `/^I should see "(.*?)"$/'
features/can_access_home.feature:7:in `Then I should see "Test"'
So strange. With save_and_open_page i see my page without any problems. Could you help me please to fix it?
PS: i'm using minitest but not rspec