Permalink
Browse files

Removed cucumber features

  • Loading branch information...
1 parent 7cf9bf7 commit c0647595b28287a1114c278ee4ef1d2f77464e24 @harlow harlow committed Oct 16, 2012
@@ -1,22 +0,0 @@
-Feature: install and run cucumber features
-
- Background:
- Given I have a project with clearance and the following gems:
- | gem |
- | cucumber-rails |
- | capybara |
- | rspec-rails |
- | factory_girl_rails |
- | database_cleaner |
- And I run `bundle install --local`
- And I successfully run `bundle exec rails generate cucumber:install`
- And I successfully run `bundle exec rails generate clearance:features`
- And I successfully run `bundle exec rails generate clearance:install`
-
- Scenario: generate a Rails app, run the generators, and run the tests
- Then the output should contain "Next steps"
- When I successfully run `bundle exec rake db:migrate --trace`
- And I successfully run `bundle exec rake --trace`
- Then the output should contain "passed"
- And the output should not contain "failed"
- And the output should not contain "Could not find generator"
@@ -1,5 +0,0 @@
-Description:
- Generate Cucumber features and step definitions
-
-Examples:
- rails generate clearance:cucumber_features
@@ -1,17 +0,0 @@
-require 'rails/generators/base'
-
-module Clearance
- module Generators
- class FeaturesGenerator < Rails::Generators::Base
- source_root File.expand_path('../templates', __FILE__)
-
- def create_features
- directory 'features'
- end
-
- def create_factories
- directory 'spec'
- end
- end
- end
-end
@@ -1,34 +0,0 @@
-Feature: Password reset
-
- In order to sign in even if I forgot my password
- As a user
- I want to reset my password
-
- Scenario: User is not signed up
- When I reset the password for "unknown.email@example.com"
- Then instructions for changing my password are not emailed
-
- Scenario: User is signed up and requests password reset
- Given I signed up with "email@example.com"
- When I reset the password for "email@example.com"
- Then instructions for changing my password are emailed to "email@example.com"
-
- Scenario: User tries to reset his password with a blank password
- Given I signed up with "email@example.com"
- When I reset the password for "email@example.com"
- And I follow the password reset link sent to "email@example.com"
- And I update my password with ""
- Then I am told to enter a password
- And I should be signed out
-
- Scenario: User is signed up and updates his password
- Given I signed up with "email@example.com"
- When I reset the password for "email@example.com"
- And I follow the password reset link sent to "email@example.com"
- And I update my password with "newpassword"
- Then I should be signed in
- When I sign out
- Then I should be signed out
- When I sign in with "email@example.com" and "newpassword"
- Then I should be signed in
-
@@ -1,33 +0,0 @@
-Feature: Sign in
-
- In order to get access to protected sections of the site
- As a visitor
- I want to sign in
-
- Scenario: Visitor is not signed up
- When I sign in as "unknown.email@example.com"
- Then I am told email or password is bad
- And I should be signed out
-
- Scenario: Visitor enters wrong password
- Given I am signed up as "email@example.com"
- When I sign in as "email@example.com" and "badpassword"
- Then I am told email or password is bad
- And I should be signed out
-
- Scenario: Visitor signs in successfully
- Given I am signed up as "email@example.com"
- When I sign in as "email@example.com"
- Then I should be signed in
-
- Scenario: Visitor signs in successfully with uppercase email
- Given I am signed up as "email@example.com"
- When I sign in as "Email@example.com"
- Then I should be signed in
-
- Scenario: Visitor enters wrong password and goes to sign up
- Given I am signed up as "email@example.com"
- When I sign in as "email@example.com" and "badpassword"
- Then I am told email or password is bad
- When I follow the sign up link in the flash
- Then I should be on the sign up page
@@ -1,12 +0,0 @@
-Feature: Sign out
-
- In order to protect my account from unauthorized access
- As a signed in user
- I want to sign out
-
- Scenario: User signs out
- Given I am signed up as "email@example.com"
- When I sign in as "email@example.com"
- Then I should be signed in
- When I sign out
- Then I should be signed out
@@ -1,17 +0,0 @@
-Feature: Sign up
-
- In order to access protected sections of the site
- As a visitor
- I want to sign up
-
- Scenario: Visitor signs up with invalid email
- When I sign up with "invalidemail" and "password"
- Then I should be signed out
-
- Scenario: Visitor signs up with blank password
- When I sign up with "email@example.com" and ""
- Then I should be signed out
-
- Scenario: Visitor signs up with valid data
- When I sign up with "email@example.com" and "password"
- Then I should be signed in
@@ -1,129 +0,0 @@
-# Existing users
-
-require 'factory_girl_rails'
-
-Given /^(?:I am|I have|I) signed up (?:as|with) "(.*)"$/ do |email|
- FactoryGirl.create :user, :email => email
-end
-
-# Sign up
-
-When /^I sign up (?:with|as) "(.*)" and "(.*)"$/ do |email, password|
- visit sign_up_path
- page.should have_css("input[type='email']")
- fill_in 'Email', :with => email
- fill_in 'Password', :with => password
- click_button 'Sign up'
-end
-
-# Sign in
-
-Given /^I sign in$/ do
- email = FactoryGirl.generate(:email)
- steps %{
- Given I have signed up with "#{email}"
- And I sign in with "#{email}"
- }
-end
-
-When /^I sign in (?:with|as) "([^"]*)"$/ do |email|
- step %{I sign in with "#{email}" and "password"}
-end
-
-When /^I sign in (?:with|as) "([^"]*)" and "([^"]*)"$/ do |email, password|
- visit sign_in_path
- page.should have_css("input[type='email']")
- fill_in 'Email', :with => email
- fill_in 'Password', :with => password
- click_button 'Sign in'
-end
-
-# Sign out
-
-When 'I sign out' do
- visit '/'
- click_link 'Sign out'
-end
-
-# Reset password
-
-When /^I reset the password for "(.*)"$/ do |email|
- visit new_password_path
- page.should have_css("input[type='email']")
- fill_in 'Email address', :with => email
- click_button 'Reset password'
-end
-
-Then /^instructions for changing my password are not emailed$/ do
- page.should have_content('instructions for changing your password')
- assert ActionMailer::Base.deliveries.empty?
-end
-
-Then /^instructions for changing my password are emailed to "(.*)"$/ do |email|
- page.should have_content('instructions for changing your password')
- user = User.find_by_email!(email)
- assert !user.confirmation_token.blank?
- assert !ActionMailer::Base.deliveries.empty?
-
- result = ActionMailer::Base.deliveries.any? do |email|
- email.to == [user.email] &&
- email.subject =~ /password/i &&
- email.body =~ /#{user.confirmation_token}/
- end
-
- assert result
-end
-
-When /^I follow the password reset link sent to "(.*)"$/ do |email|
- user = User.find_by_email!(email)
- visit edit_user_password_path(:user_id => user,
- :token => user.confirmation_token)
-end
-
-When /^I change the password of "(.*)" without token$/ do |email|
- user = User.find_by_email!(email)
- visit edit_user_password_path(:user_id => user)
-end
-
-When /^I update my password with "(.*)"$/ do |password|
- fill_in 'Choose password', :with => password
- click_button 'Save this password'
-end
-
-# Navigation
-
-Then /^I should be on the sign up page$/ do
- page.current_path.should == sign_up_path
-end
-
-# Flashes
-
-Then /^I am told email or password is bad$/ do
- page.should have_content('Bad email or password. Are you trying to register a new account? Sign up.')
-end
-
-When /^I follow the sign up link in the flash$/ do
- within '#flash' do
- click_link 'Sign up'
- end
-end
-
-Then /^I am told email is unknown$/ do
- page.should have_content('Unknown email')
-end
-
-Then /^I am told to enter a password$/ do
- page.should have_content("Password can't be blank")
-end
-
-# Verification
-
-Then /^I should be signed in$/ do
- visit '/'
- page.should have_content 'Sign out'
-end
-
-Then /^I should be signed out$/ do
- visit '/'
- page.should have_content 'Sign in'
-end
@@ -1,10 +0,0 @@
-FactoryGirl.define do
- sequence :email do |n|
- "user#{n}@example.com"
- end
-
- factory :user do
- email
- password 'password'
- end
-end

0 comments on commit c064759

Please sign in to comment.