I use some ActiveRecord models outside of Rails , for which I write unit tests. In my tests, I would like to use tools and thought that I would use some of rspec-rails for this. I can't just use require "rspec-rails" because it has some Rails dependencies and I don't use Rails.
Here is the spec_helper I'm using:
require 'active_record' require 'active_record/fixtures' require 'active_support' require 'rspec/rails/extensions/active_record/base' require 'rspec/rails/adapters' require 'rspec/rails/fixture_support'
end
And here is a test example
require 'spec_helper' describe Transaction do before :each do self.class.fixtures :users, :merchants end it "should do this and that" do ... end end
The problem is that in this way the luminaires do not load. I looked at the rspec-rails code but cannot figure out which module I should extend or the method I should name.
Rodrigue
source share