Sha256: 253c2c8bd8f6031e15e56e2136c9f9c3e9231dd6459273c9337c9312e5793f52

Contents?: true

Size: 1.12 KB

Versions: 20

Compression:

Stored size: 1.12 KB

Contents

Then /^I should see crud show tabular attributes$/ do
  data = tableish('table.table tr', 'td,th').flatten
  data[0].should == "id"
  data[2].should == "first_name"
  data[3].should == "Mary"
  data[4].should == "last_name"
  data[5].should == "Jane"
  data[6].should == "age"
  data[7].should == "21"
  data[8].should == "data"
  data[9].should == "nil"
  data[10].should == "active"
  data[11].should == "false"
  data[12].should == "description"
  data[13].should == ""
  data[14].should == "born_at"
  data[15].should =~ /30-August-2010/
end

Then /^I should find value "(.*)" for "(.*)"$/ do |text, column|
  index = (column == 'created_at') ? 9 : 10
  page.should have_xpath( "//form//div[@class='data'][#{index}]", :text => Regexp.new(text) )
end

Then /^I should notice id of the last person$/ do
  page.should have_content("ID #{User.last.id}")
end

Then /^I should notice id of website of the last person$/ do
  page.should have_content("ID #{User.last.website.id}")
end

Given /^user owns two clubs "sun-shine" and "rise-n-shine"$/ do
  u = User.last
  u.clubs.create(:name => 'sun-shine')
  u.clubs.create(:name => 'rise-n-shine')
end

Version data entries

20 entries across 20 versions & 2 rubygems

Version Path
the_jobbook_admin_data-1.3.0a test/dummy/features/step_definitions/crud_show_steps.rb
admin_data-1.2.1 test/rails_root/features/step_definitions/crud_show_steps.rb
admin_data-1.2.0 test/rails_root/features/step_definitions/crud_show_steps.rb
admin_data-1.1.16 test/rails_root/features/step_definitions/crud_show_steps.rb
admin_data-1.1.15 test/rails_root/features/step_definitions/crud_show_steps.rb
admin_data-1.1.14 test/rails_root/features/step_definitions/crud_show_steps.rb
admin_data-1.1.13 test/rails_root/features/step_definitions/crud_show_steps.rb
admin_data-1.1.12 test/rails_root/features/step_definitions/crud_show_steps.rb
admin_data-1.1.11 test/rails_root/features/step_definitions/crud_show_steps.rb
admin_data-1.1.10 test/rails_root/features/step_definitions/crud_show_steps.rb
admin_data-1.1.9 test/rails_root/features/step_definitions/crud_show_steps.rb
admin_data-1.1.8 test/rails_root/features/step_definitions/crud_show_steps.rb
admin_data-1.1.7 test/rails_root/features/step_definitions/crud_show_steps.rb
admin_data-1.1.6 test/rails_root/features/step_definitions/crud_show_steps.rb
admin_data-1.1.5 test/rails_root/features/step_definitions/crud_show_steps.rb
admin_data-1.1.4 test/rails_root/features/step_definitions/crud_show_steps.rb
admin_data-1.1.3 test/rails_root/features/step_definitions/crud_show_steps.rb
admin_data-1.1.2 test/rails_root/features/step_definitions/crud_show_steps.rb
admin_data-1.1.1 test/rails_root/features/step_definitions/crud_show_steps.rb
admin_data-1.1.0 test/rails_root/features/step_definitions/crud_show_steps.rb