[rspec-devel] [ rspec-Bugs-7409 ] default fixtures do not appear to run.

noreply at rubyforge.org noreply at rubyforge.org
Tue Jan 2 07:38:42 EST 2007


Bugs item #7409, was opened at 2006-12-21 07:23
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7409&group_id=797

>Category: rails plugin
Group: None
>Status: Closed
>Resolution: Accepted
Priority: 3
Submitted By: Dallas Pool (codeninja)
>Assigned to: David Chelimsky (dchelimsky)
Summary: default fixtures do not appear to run.

Initial Comment:
when I insert my default fixtures into the spec helper... "Nothing Happens" and all tests fail.



----------------------------------------------------------------------

>Comment By: David Chelimsky (dchelimsky)
Date: 2007-01-02 12:38

Message:
Fixed in trunk (rev 1358).

I added a slightly different mechanism for global fixtures. In spec_helper.rb, you have to add a line to Spec::Rails::EvalContext

self.global_fixtures = :table_a, :table_b, :etc

----------------------------------------------------------------------

Comment By: Aslak Hellesøy (aslak_hellesoy)
Date: 2006-12-28 21:21

Message:
We can reproduce it in the spec/rails demo app as follows:

1) comment out "fixtures :people, :animals" in person_spec.rb
2) put "fxtures :people, :animals" in spec_helper.rb
3) ruby -I../rspec/lib spec/models/person_spec.rb

See the specs fail

----------------------------------------------------------------------

Comment By: David Chelimsky (dchelimsky)
Date: 2006-12-28 20:29

Message:
Can we see the full text of your spec_helper please?

----------------------------------------------------------------------

Comment By: Dallas Pool (codeninja)
Date: 2006-12-21 17:43

Message:
This line (ENV["RAILS_ENV"] = "test") is currently in the
top of my spec_helper.rb and I snagged the plugin directly
from trunk 2 days ago. The problem persists. 

Please advise. 
Thanks.

----------------------------------------------------------------------

Comment By: David Chelimsky (dchelimsky)
Date: 2006-12-21 12:50

Message:
Please add the following to the top of spec_helper and tell us if you still experience the problem:

ENV["RAILS_ENV"] = "test"

This was errantly removed from spec_helper. It has now been replaced (in trunk), so if that solves your problem we can close this ticket.

Thanks

----------------------------------------------------------------------

You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7409&group_id=797


More information about the rspec-devel mailing list