Started to Implement D-A, and roles scaffold - Need to finish Test Suite
[base_ror3_portal.git] / features / step_definitions / role_steps.rb
blob712ad1de2aa47aeed8e4efb1bc5e58f8fabd74eb
1 Given /^the following roles:$/ do |roles|
2   Role.create!(roles.hashes)
3 end
5 When /^I delete the (\d+)(?:st|nd|rd|th) role$/ do |pos|
6   visit roles_path
7   within("table tr:nth-child(#{pos.to_i+1})") do
8     click_link "Destroy"
9   end
10 end
12 Then /^I should see the following roles:$/ do |expected_roles_table|
13   expected_roles_table.diff!(tableish('table tr', 'td,th'))
14 end