[rspec-devel] [ rspec-Bugs-6570 ] rSpec on Rails does not clean the test DB inbetween contexts

noreply at rubyforge.org noreply at rubyforge.org
Wed Nov 8 12:45:13 EST 2006


Bugs item #6570, was opened at 2006-11-08 18:45
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=3149&aid=6570&group_id=797

Category: rails plugin
Group: None
Status: Open
Resolution: None
Priority: 3
Submitted By: Timm Gebhart (onkeltimm)
Assigned to: Nobody (None)
Summary: rSpec on Rails does not clean the test DB inbetween contexts

Initial Comment:
Version:
RSpec-0.7.0 (r1039)

When I set up a context and load fixtures, those are not removed from the test DB before the next context is run, like this:

# This runs fine
context "Context with fixtures" do
  fixtures :tests

  specify "should have records" do
    Test.find(:all).should_not_be_empty
  end
end

# This fails
context "Context w/o fixtures" do
  specify "should have no records" do
    Test.should_have(:no).records
  end
end

The Test DB should be clean upon entering a context.

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

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


More information about the rspec-devel mailing list