Hi David<br><br>I have that option set already, and i'm not using any fixtures in spec_helper. My spec helper looks like this: is it the use_instantiated_fixtures option perhaps? (i don't know what that does).<br>
<br>thanks, max<br>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><br>ENV["RAILS_ENV"] = "test"<br>
require File.expand_path(File.dirname(__FILE__) + "/../config/environment")<br>require 'spec'<br>require 'spec/rails'<br>require 'spec/custom_matchers' <br><br>Spec::Runner.configure do |config|<br>
# If you're not using ActiveRecord you should remove these<br> # lines, delete config/database.yml and disable :active_record<br> # in your config/boot.rb<br> config.use_transactional_fixtures = true<br> config.use_instantiated_fixtures = false<br>
config.fixture_path = RAILS_ROOT + '/spec/fixtures/'<br> <br> #custom stuff<br> config.include(CustomMatchers)<br> <br> def mock_login_required(allow_user_to_pass=true) <br> controller.stub!(:login_required).and_return(allow_user_to_pass)<br>
end<br> <br> def mock_admin_user?(allow_user_to_pass=true) <br> controller.stub!(:admin_user?).and_return(allow_user_to_pass)<br> end<br> <br> def mock_current_user(id = 1)<br> @user = mock_model(User, :to_param => id.to_s, :id => 1)<br>
controller.stub!(:current_user).and_return(@user)<br> end<br>end<br><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<br>
<br><br><div><span class="gmail_quote">On 21/02/2008, <b class="gmail_sendername">David Chelimsky</b> <<a href="mailto:dchelimsky@gmail.com">dchelimsky@gmail.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On Thu, Feb 21, 2008 at 6:17 AM, Max Williams<br> <<a href="mailto:toastkid.williams@gmail.com">toastkid.williams@gmail.com</a>> wrote:<br> > I have a fixture for one of my tables that i use in some model tests. The<br>
> data in it is messing up some other tests for a different model, that<br> > doesn't ask for the fixture - isn't the fixture data supposed to be cleared<br> > out of the test db in between tests, and only be present if specifically<br>
> asked for? or am i using them wrong?<br> <br> <br>It depends on settings you have in spec_helper.rb. You should have this:<br> <br> config.use_transactional_fixtures = true<br> <br> You should also not be declaring any fixtures in spec_helper.rb, given<br>
your situation.<br> <br> HTH,<br> David<br> <br> ><br> > thanks<br> > max<br> ><br> > _______________________________________________<br> > rspec-users mailing list<br> > <a href="mailto:rspec-users@rubyforge.org">rspec-users@rubyforge.org</a><br>
> <a href="http://rubyforge.org/mailman/listinfo/rspec-users">http://rubyforge.org/mailman/listinfo/rspec-users</a><br> ><br> _______________________________________________<br> rspec-users mailing list<br> <a href="mailto:rspec-users@rubyforge.org">rspec-users@rubyforge.org</a><br>
<a href="http://rubyforge.org/mailman/listinfo/rspec-users">http://rubyforge.org/mailman/listinfo/rspec-users</a><br> </blockquote></div><br>