1
0
Fork 0
mirror of https://github.com/teamcapybara/capybara.git synced 2022-11-09 12:08:07 -05:00
teamcapybara--capybara/features/step_definitions/capybara_steps.rb
Jonas Nicklas 1a3e38b89c Fix cukes
2012-07-10 11:27:58 +02:00

24 lines
545 B
Ruby

When /^I visit the (?:root|home) page$/ do
visit('/')
end
Then /^I should see "([^"]*)"$/ do |text|
page.should have_content(text)
end
Then /^Capybara should use the "([^"]*)" driver$/ do |driver|
Capybara.current_driver.should == driver.to_sym
end
When /^I use a matcher that fails$/ do
begin
page.should have_css('h1#doesnotexist')
rescue StandardError => e
@error_message = e.message
end
end
Then /^the failing exception should be nice$/ do
@error_message.should =~ %r(expected to find css \"h1#doesnotexist\")
end