Sha256: 97a08f1203bfb517614f839a7f6f31adc265a59b02186c32089e239338f54280

Contents?: true

Size: 562 Bytes

Versions: 6

Compression:

Stored size: 562 Bytes

Contents

if defined?(ActiveRecord::Base)
  class ActiveRecord::Base
    class_attribute :shared_connection

    def self.connection
      self.shared_connection || retrieve_connection
    end
  end

  Before('@javascript') do
    Cucumber::Rails::Database.before_js if Cucumber::Rails::Database.autorun_database_cleaner
  end

  Before('~@javascript') do
    Cucumber::Rails::Database.before_non_js if Cucumber::Rails::Database.autorun_database_cleaner
  end

  After do
    Cucumber::Rails::Database.after if Cucumber::Rails::Database.autorun_database_cleaner
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
cucumber-rails-1.5.0 lib/cucumber/rails/hooks/active_record.rb
cucumber-rails-1.4.5 lib/cucumber/rails/hooks/active_record.rb
cucumber-rails-1.4.4 lib/cucumber/rails/hooks/active_record.rb
cucumber-rails-1.4.3 lib/cucumber/rails/hooks/active_record.rb
cucumber-rails-1.4.2 lib/cucumber/rails/hooks/active_record.rb
cucumber-rails-1.4.1 lib/cucumber/rails/hooks/active_record.rb