Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix failing cucumber feature #45

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Fix failing cucumber feature #45

wants to merge 1 commit into from

Conversation

JESii
Copy link

@JESii JESii commented Apr 18, 2013

Use database_cleaner strategy = :truncation instead of transaction which causes nil error

Use database_cleaner strategy = :truncation instead of transaction which causes nil error
@MarkDBlackwell
Copy link

Possibly your nil error is what bundle exec rake gives me (after cloning the example app):

Feature: Sign in
  Scenario: User is not signed up         # features/users/sign_in.feature:6
    Given I do not exist as a user        # features/step_definitions/user_steps.rb:62
    When I sign in with valid credentials # features/step_definitions/user_steps.rb:72
    Then I see an invalid login message   # features/step_definitions/user_steps.rb:180
    And I should be signed out            # features/step_definitions/user_steps.rb:142
      undefined method `flatten' for nil:NilClass (NoMethodError)
      /home/mark/.rvm/gems/ruby-1.9.3-p392@global/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/database_statements.rb:348:in `rollback_transaction_records'
      /home/mark/.rvm/gems/ruby-1.9.3-p392@global/gems/database_cleaner-1.0.0.RC1/lib/database_cleaner/active_record/transaction.rb:36:in `clean'
      /home/mark/.rvm/gems/ruby-1.9.3-p392@global/gems/database_cleaner-1.0.0.RC1/lib/database_cleaner/base.rb:77:in `clean'
      /home/mark/.rvm/gems/ruby-1.9.3-p392@global/gems/database_cleaner-1.0.0.RC1/lib/database_cleaner/configuration.rb:79:in `block in clean'
      /home/mark/.rvm/gems/ruby-1.9.3-p392@global/gems/database_cleaner-1.0.0.RC1/lib/database_cleaner/configuration.rb:79:in `each'
      /home/mark/.rvm/gems/ruby-1.9.3-p392@global/gems/database_cleaner-1.0.0.RC1/lib/database_cleaner/configuration.rb:79:in `clean'
      /home/mark/.rvm/gems/ruby-1.9.3-p392@global/gems/cucumber-rails-1.3.1/lib/cucumber/rails/hooks/database_cleaner.rb:9:in `After'

My versions:

$ bundle exec cucumber --version
1.2.3
$ bundle exec rails -v
Rails 3.2.13
$ bundle exec ruby -v
ruby 1.9.3p392 (2013-02-22 revision 39386) [i686-linux]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants