[rspec-devel] [ rspec-Bugs-12699 ] Shared Specs are not reloaded when using DRb

noreply at rubyforge.org noreply at rubyforge.org
Mon Jul 30 16:12:05 EDT 2007


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

Category: Autotest
Group: None
Status: Open
Resolution: None
Priority: 3
Submitted By: Brian Takita (btakita)
Assigned to: Nobody (None)
Summary: Shared Specs are not reloaded when using DRb

Initial Comment:
If I change the spec, it does not reload on the spec_server.

To reproduce, make a spec, create a spec and run it using the spec_server.

describe "DRb", :shared => true do
  it "should reload shared specs" do
    true.should == false
  end
end

describe "DRb reloading" do
  it_should_behave_like "DRb"
end

Now edit the shared spec:

describe "DRb", :shared => true do
  it "should reload shared specs" do
    true.should == true
  end
end

There will still be a failure.

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

>Comment By: Brian Takita (btakita)
Date: 2007-07-30 13:12

Message:
To fix this for my project I edited spec_server:

module Spec
  module Runner
    class RailsSpecServer
      def run(args, stderr, stdout)
        $stdout = stdout
        $stderr = stderr

        Spec::DSL::Behaviour.shared_behaviours.clear
        Dependencies.mechanism = :load
        Dependencies.clear
        
        ::Spec::Runner::CommandLine.run(args, stderr,
stdout, false, true)
      end
    end
  end
end


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

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


More information about the rspec-devel mailing list