Dave Nolan
2009-Aug-20 17:11 UTC
[rspec-users] Workaround for spec_server "can''t dup NilClass"
On recent versions of RSpec/RSpec rails, if you are using Machinist/Factory_Girl or similar, you may get "can''t dup NilClass" errors running specs through spec_server. (Not on the initial run, but on all subsequent runs.) The workaround is to manually re-load the factories/templates each spec run e.g. by placing "load" statements within the Spec::Runner.configure block in spec_helper. I understand spec_server is deprecated but its replacement (spork) is not windows-compatible. So if you''re stuck with spec_server, this is for you. (I''m running RSpec/RSpec Rails 1.2.7+ - YMMV) HTHSomeoneElse Dave -- Posted via http://www.ruby-forum.com/.
Tim Harper
2009-Aug-31 22:25 UTC
[rspec-users] Workaround for spec_server "can''t dup NilClass"
Hi Dave, Have you voted for spork-windows support? It''s getting closer, but issues will be tackled in the order of most votes. http://github.com/timcharper/spork/issues#issue/3 Tim On Thu, Aug 20, 2009 at 12:11 PM, Dave Nolan<lists at ruby-forum.com> wrote:> On recent versions of RSpec/RSpec rails, if you are using > Machinist/Factory_Girl or similar, you may get "can''t dup NilClass" > errors running specs through spec_server. (Not on the initial run, but > on all subsequent runs.) > > The workaround is to manually re-load the factories/templates each spec > run e.g. by placing "load" statements within the Spec::Runner.configure > block in spec_helper. > > I understand spec_server is deprecated but its replacement (spork) is > not windows-compatible. So if you''re stuck with spec_server, this is for > you. > > (I''m running RSpec/RSpec Rails 1.2.7+ - YMMV) > > HTHSomeoneElse > Dave > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users >