Sha256: ac72a5aeed14918ae3c4b420b9eac997357b9d1a175db944ce067515d88bca26

Contents?: true

Size: 596 Bytes

Versions: 3

Compression:

Stored size: 596 Bytes

Contents

Given /^the following (.+) exists?:$/ do |model, table|
  table.hashes.each do |hash|
    FactoryGirl.create(model.singularize.to_sym, hash)
  end
end
Given /^(.+) has stunned an international crowd$/ do |name|
  Hero.find_by_name(name).stun_international_crowd!
end
When /I visit (\w+) ([^']+)'s show page/ do |type, name|
  plurals = {'user' => 'users', 'hero' => 'heroes'}
  visit "/#{plurals[type]}/#{type.capitalize.constantize.find_by_name(name).id}"
end
Then /I should see "(.+)" within "(.+)"/ do |content, selector|
  puts page.html
  page.should have_css(selector, :text => content)
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
view_models-4.0.1 feature_support/testapp/features/step_definitions/testapp_steps.rb
view_models-3.0.1 feature_support/testapp/features/step_definitions/testapp_steps.rb
view_models-3.0.0 feature_support/testapp/features/step_definitions/testapp_steps.rb