Skip to content

Instantly share code, notes, and snippets.

@hobodave
Created August 21, 2009 16:13
Show Gist options
  • Select an option

  • Save hobodave/172149 to your computer and use it in GitHub Desktop.

Select an option

Save hobodave/172149 to your computer and use it in GitHub Desktop.
require "spec/expectations"
require "webrat"
require "webrat/mechanize"
Webrat.configure do |config|
config.mode = :mechanize
end
World do
session = Webrat::MechanizeAdapter.new
session.extend(Webrat::Methods)
session.extend(Webrat::Matchers)
session.extend(Webrat::HaveTagMatcher)
session
end
Given I visit "https://nmh.sentact.com" # features/step_definitions/nmh_steps.rb:1
Then the page should load successfully # features/step_definitions/nmh_steps.rb:16
expected: 200,
got: nil (using ==) (Spec::Expectations::ExpectationNotMetError)
./features/step_definitions/nmh_steps.rb:17:in `/the page should load successfully/'
features/nmh_index.feature:8:in `Then the page should load successfully'
Failing Scenarios:
cucumber features/nmh_index.feature:6 # Scenario: Load the article admin form
Given /^I visit "([^\"]*)"$/ do |website|
visit website
end
Then /the page should load successfully/ do
response.should == 200
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment