Sha256: 31f8145e7fa23f606b36774662c43116ba24a074d81f171a70aed481344d4407

Contents?: true

Size: 919 Bytes

Versions: 8

Compression:

Stored size: 919 Bytes

Contents

Given /^I am a new visitor$/ do
  clear_cookies
end

When /^I view "([^\"]*)"$/ do |path|
  visit(path)
end

When /^I (post|put) to "([^\"]*)":$/ do |meth, path, params|
  send(meth, path, params.hashes.inject({}){|h,e| h[e["key"]] = e["value"]; h})
end

Then /^I should see "([^\"]*)"$/ do |string|
  assert_contain(string)
end

Then /^I should not see "([^\"]*)"$/ do |string|
  assert_not_contain(string)
end

Then /^the page should have "([^\"]*)"$/ do |selector|
  assert_have_selector selector
end

Then /^the page should not have "([^\"]*)"$/ do |selector|
  assert_have_no_selector selector
end

When /^I follow "([^\"]*)"$/ do |link|
  click_link(link)
end

When /^I fill in "([^\"]*)" with "([^\"]*)"$/ do |field, value|
  fill_in(field, :with => value)
end

When /^I press "([^\"]*)"$/ do |button|
  click_button(button)
end

Then /^I should be on "([^\"]*)"$/ do |path|
  assert_equal path, current_url
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
metry-2.0.4 features/step_definitions/web.rb
metry-2.0.5 features/step_definitions/web.rb
metry-2.1.0 features/step_definitions/web.rb
metry-2.1.1 features/step_definitions/web.rb
metry-2.0.0 features/step_definitions/web.rb
metry-2.0.1 features/step_definitions/web.rb
metry-2.0.2 features/step_definitions/web.rb
metry-2.0.3 features/step_definitions/web.rb