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

undefined method 'flatten' for nil:NilClass error in tests #38

Closed
MarkDBlackwell opened this issue May 28, 2013 · 2 comments
Closed

undefined method 'flatten' for nil:NilClass error in tests #38

MarkDBlackwell opened this issue May 28, 2013 · 2 comments

Comments

@MarkDBlackwell
Copy link

Currently, after cloning the example app, a test error is emitted:

Feature: Sign in
  Scenario: User is not signed up         # features/users/sign_in.feature:6
    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]
@MarkDBlackwell
Copy link
Author

Would something like this pull request (regarding another Rails Example Apps' Cucumber configuration) help resolve this error?

@MarkDBlackwell
Copy link
Author

When the app is regenerated, the error goes away.

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

No branches or pull requests

1 participant