You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ spork
Using RSpec, Unknown
Loading Spork.prefork block...
WARNING: Cucumber-rails required outside of env.rb. The rest of loading is being defered until env.rb is called.
To avoid this warning, move 'gem cucumber-rails' under only group :test in your Gemfile
Loading configuration for 'test'.
[DEVISE] Devise.apply_schema is deprecated and has no effect. Please remove it.
[DEVISE] Devise.use_salt_as_remember_token is deprecated and has no effect. Please remove it.
DEPRECATION WARNING: The InstanceMethods module inside ActiveSupport::Concern will be no longer included automatically. Please define instance methods directly in Mongoid::Spacial::Document instead. (called from include at /Users/kruttikagarwal/Documents/workspace-rails/tappedin/app/models/need.rb:3)
DEPRECATION WARNING: The InstanceMethods module inside ActiveSupport::Concern will be no longer included automatically. Please define instance methods directly in Mongoid::Spacial::Document instead. (called from include at /Users/kruttikagarwal/Documents/workspace-rails/tappedin/app/models/address.rb:3)
/Users/kruttikagarwal/.rvm/gems/ruby-1.9.3-p0@rails327/gems/activesupport-3.2.7/lib/active_support/dependencies.rb:251:in `block in require': iconv will be deprecated in the future, use String#encode instead.
Spork is ready and listening on 8989!
Rspec also runs fine-
$ rspec ./spec/models/aspect_spec.rb:6 --drb
$ rspec ./spec/models/aspect_spec.rb:6 --drb
Run options: include {:locations=>{"./spec/models/aspect_spec.rb"=>[6]}}
F
Failures:
1) Aspect
Failure/Error: it {should have_and_belong_to_many :questions}
Expected Aspect to reference and referenced in many "questions", got no association named questions
# ./spec/models/aspect_spec.rb:6:in `block (2 levels) in <top (required)>'
Finished in 0.13289 seconds
1 example, 1 failure
Failed examples:
rspec ./spec/models/aspect_spec.rb:6 # Aspect
but when I update the aspect.rb mongoid model, it does get reloaded when I run rpsec again. I continue to get outdated error.
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.rbSpork.each_rundo# This code will be run each time you run your specs.FactoryGirl.reload# reload all the modelsDir["#{Rails.root}/app/models/**/*.rb","#{Rails.root}/app/services/**/*.rb","#{Rails.root}/app/admin/**/*.rb","#{Rails.root}/app/mailers/**/*.rb"].eachdo |model|
loadmodelendend
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?
The text was updated successfully, but these errors were encountered: