Open k504866430 opened 12 years ago
I haven't seen this issue with Rails 3.2.8, Mongoid 3.0.6, Mongoid-RSpec 1.5.4, RSpec 2.11.0 (rspec-core 2.11.1) and Spork 1.0.0rc3. Are you still having this issue?
Lemme check that and I will get back to you. To get around the issue, I did the following-
# spec_helper.rb
Spork.each_run do
# This code will be run each time you run your specs.
FactoryGirl.reload
# reload all the models
Dir["#{Rails.root}/app/models/**/*.rb", "#{Rails.root}/app/services/**/*.rb", "#{Rails.root}/app/admin/**/*.rb","#{Rails.root}/app/mailers/**/*.rb"].each do |model|
load model
end
end
This started happening to my tests as well after I upgraded to spork 1.0.0rc3 without realizing that the rails integration stuff had been moved to a new gem.
After switching to gem 'spork-rails' everything is fine again.
My gems-
The documentation at https://github.com/sporkrb/spork/wiki/Spork.trap_method-Jujitsu does not work for me. The following is my config-
spork starts fine-
Rspec also runs fine-
but when I update the aspect.rb mongoid model, it does get reloaded when I run rpsec again. I continue to get outdated error.
Wasn't trap_method designed to do that?