Created
January 21, 2013 06:46
-
-
Save normancapule/4584056 to your computer and use it in GitHub Desktop.
Cucumber-rails default database cleaner action is to delete all data regardless of any specific config in env.rb. This resulted to Scenario 2 failing without removing the database_cleaner gem in the Gemfile.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#admin_signup.feature | |
@retain | |
Feature: User Signup | |
In order to signup | |
As a new user | |
I want to be able to create an admin user account | |
And edit this user's company profile | |
@retain | |
Scenario: Register in Truetime as an Admin. | |
Given I am in the login page | |
When I create a new admin user | |
And I open the email with subject "Activation Instructions" | |
Then I should be registered as an Admin | |
And I should see the "Download the Event Manager!" | |
@retain | |
Scenario: Edit Company Profile | |
Given I am logged in as an Admin | |
And I am in the admin page | |
When I access the Settings tab | |
Then I should be able to edit my company profile | |
#env.rb | |
ENV["RAILS_ENV"] = 'test' | |
require 'cucumber/rails' | |
require 'email_spec/cucumber' | |
require 'factory_girl' | |
require 'factory_girl/step_definitions' | |
Capybara.default_driver = :selenium | |
Capybara.default_selector = :css | |
DatabaseCleaner.strategy = :truncation, :except => [:retain] | |
ActionController::Base.allow_rescue = false |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment