4

I am using rails3 without database and wondering what should be in database.yml to pass rake test. It fails now. I didn't specify anything in the file yet. My models are going to use ActiveModel.

class User

  # https://github.com/rails/rails/tree/master/activemodel
  include ActiveModel::Validations
  include ActiveModel::Conversion
...

end

Running rake test:

runtime/lib/ruby/gems/1.8/gems/memory_test_fix-0.1.3/lib/memory_test_fix.rb:29:in `in_memory_database?': undefined method `[]' for false:FalseClass (NoMethodError)
...
Istvan
  • 7,500
  • 9
  • 59
  • 109

2 Answers2

10

the following must be in application.rb:

require "action_controller/railtie"
require "action_mailer/railtie"
require "active_resource/railtie"
require "rails/test_unit/railtie"

Instead of

require 'rails/all'
Istvan
  • 7,500
  • 9
  • 59
  • 109
0

remove active record from your environment.rb

config.frameworks -= [ :active_record ]
Brandon Frohbieter
  • 17,563
  • 3
  • 40
  • 62