Skip to content

Instantly share code, notes, and snippets.

@vartikasingh
Created April 26, 2012 03:44
Show Gist options
  • Save vartikasingh/2495616 to your computer and use it in GitHub Desktop.
Save vartikasingh/2495616 to your computer and use it in GitHub Desktop.
Given /^I have no admin$/ do
Adminrequest.delete_all
end
When /^I click on "([^"]*)"$/ do |arg1|
visit('/session/new')
click_link 'Create channels'
end
Then /^I am routed to a new page admin_request$/ do
visit('/account/admin_request')
end
When /^(?:|I )fill in email with "([^"]*)"(?: within "([^"]*)")?$/ do |id, value, selector|
with_scope(body) do
fill_in(id, :with => value)
end
end
When /^(?:|I )fill in field with "([^"]*)"(?: within "([^"]*)")?$/ do |field, value, selector|
with_scope(body) do
fill_in(field, :with => value)
end
end
Then /^I click 'Submit'$/ do
click_button 'Submit'
end
Then /^I am routed to session\/new$/ do
visit('/session/new')
end
Then /^I click on 'Approve Request'$/ do
click_button 'Approve Request'
end
Then /^I should see "([^"]*)" within "([^"]*)"notificationText"([^"]*)"$/ do |arg1, arg2, arg3|
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment