Sha256: 30cde63d78507db77b15f957402516f28ca16489abdeac672d0e00f35d500a28
Contents?: true
Size: 686 Bytes
Versions: 6
Compression:
Stored size: 686 Bytes
Contents
Given /^there are no users in the system$/ do @users = User.all @users.each { |user| user.delete! } end When /^I delete the other user$/ do id = User.last.id find(:xpath, "//table/tr/td/a[@href='/users/#{id}' and @data-method='delete']").click #find("table tr td a[@href = '/users/#{id}']").click end Given /^there are users in the system$/ do @generated_user = User.create!( :email => 'generated_user@cloudspace.com', :password => 'password', :password_confirmation => 'password' ) @generated_user.save end Then /^I should have the role "([^"]*)"$/ do |role| unless @current_user @current_user = User.last end @current_user.role?(role) end
Version data entries
6 entries across 6 versions & 1 rubygems