Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

include devise steps for cucumber

  • Loading branch information...
commit d9077ebcbe9ddc178e622b1ddb4b70cd38aa4932 1 parent 3590af5
Diego Carrion authored

Showing 2 changed files with 23 additions and 0 deletions. Show diff stats Hide diff stats

  1. +22 0 devise_steps.rb
  2. +1 0  main.rb
22 devise_steps.rb
... ... @@ -0,0 +1,22 @@
  1 +Given /^I am not authenticated$/ do
  2 + visit('/users/sign_out') # ensure that at least
  3 +end
  4 +
  5 +Given /^I have one\s+user "([^\"]*)" with password "([^\"]*)" and login "([^\"]*)"$/ do |email, password, login|
  6 + User.new(:email => email,
  7 + :login => login,
  8 + :password => password,
  9 + :password_confirmation => password).save!
  10 +end
  11 +
  12 +Given /^I am a new, authenticated user$/ do
  13 + email = 'testing@man.net'
  14 + login = 'Testing man'
  15 + password = 'secretpass'
  16 +
  17 + Given %{I have one user "#{email}" with password "#{password}" and login "#{login}"}
  18 + And %{I go to login}
  19 + And %{I fill in "user_email" with "#{email}"}
  20 + And %{I fill in "user_password" with "#{password}"}
  21 + And %{I press "Sign in"}
  22 +end
1  main.rb
@@ -55,6 +55,7 @@
55 55 get "http://github.com/dcrec1/rails3_template/raw/master/screen.scss", "app/stylesheets/screen.scss"
56 56 get "http://github.com/dcrec1/rails3_template/raw/master/application.html.haml", "app/views/layouts/application.html.haml"
57 57 get "http://github.com/dcrec1/rails3_template/raw/master/factory_girl.rb", "features/support/factory_girl.rb"
  58 +get "http://github.com/dcrec1/rails3_template/raw/master/devise_steps.rb", "features/step_definitions/devise_steps.rb"
58 59 get "http://github.com/dcrec1/rails3_template/raw/master/remarkable.rb", "spec/support/remarkable.rb"
59 60 get "http://github.com/dcrec1/rails3_template/raw/master/build.rake", "lib/tasks/build.rake"
60 61 get "http://github.com/dcrec1/rails3_template/raw/master/build.sh", "build.sh"

0 comments on commit d9077eb

Please sign in to comment.
Something went wrong with that request. Please try again.