[rspec-devel] [ rspec-Bugs-10672 ] Setting Spec::Runner.configure fixture_path doesn't seem to work

noreply at rubyforge.org noreply at rubyforge.org
Mon May 7 23:39:59 EDT 2007


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

Category: None
Group: None
Status: Open
Resolution: None
Priority: 3
Submitted By: Brian Takita (btakita)
Assigned to: Nobody (None)
Summary: Setting Spec::Runner.configure fixture_path doesn't seem to work

Initial Comment:
Spec::Runner.configure do |config|
  config.use_transactional_fixtures = true
  config.use_instantiated_fixtures  = false
  config.fixture_path = RAILS_ROOT + '/test/fixtures'
#  config.global_fixtures = :table_a, :table_b
end

module Spec
  module Rails
    module Runner
      class EvalContext < Test::Unit::TestCase
        # When the next line is uncommented, the specs work
#        self.fixture_path = RAILS_ROOT + '/test/fixtures'
        extend DisabledSpecs
        include CommunityPatentSpecHelper
        include RjsSpecHelper
      end
    end
  end
end


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

>Comment By: David Chelimsky (dchelimsky)
Date: 2007-05-08 03:39

Message:
I think this is an update problem. There is no longer a Spec::Rails::Runner::EvalContext being used (so I'm not sure what's going on with your example).

I just created a brand new rails 1.2.3 app w/ rspec rev 1930, created an rspec_resource, migrated, watched the specs pass, moved fixtures to /test/fixtures, watched the specs fail, changed the fixture path accordingly, watched the specs pass.

One problem I see is that you're extending w/ DisabledSpecs. Right now there is no support for extend in config (i.e. config.extend DisabledSpecs), but I think you can this:

module DisabledSpecs
  def included(mod)
    mod extend(self)
  end
  ..
end

Or something similar.

Please report back after playing w/ this.

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

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


More information about the rspec-devel mailing list