spec/unit/rpc/actionrunner_spec.rb in mcollective-client-2.0.0 vs spec/unit/rpc/actionrunner_spec.rb in mcollective-client-2.2.0
- old
+ new
@@ -183,11 +183,11 @@
runner = ActionRunner.new(command , @req, :json)
runner.path_to_command(command).should == command
end
it "should find the first match in the libdir" do
- Config.any_instance.expects(:libdir).returns(["#{File::SEPARATOR}libdir1", "#{File::SEPARATOR}libdir2"])
+ Config.instance.expects(:libdir).returns(["#{File::SEPARATOR}libdir1", "#{File::SEPARATOR}libdir2"])
action_in_first_dir = File.join(File::SEPARATOR, "libdir1", "agent", "spectester", "action.sh")
action_in_last_dir = File.join(File::SEPARATOR, "libdir2", "agent", "spectester", "action.sh")
File.expects("exist?").with(action_in_first_dir).returns(true)
@@ -195,10 +195,10 @@
ActionRunner.new("action.sh", @req, :json).command.should == action_in_first_dir
end
it "should find the match even in the last libdir" do
- Config.any_instance.expects(:libdir).returns(["#{File::SEPARATOR}libdir1", "#{File::SEPARATOR}libdir2"])
+ Config.instance.expects(:libdir).returns(["#{File::SEPARATOR}libdir1", "#{File::SEPARATOR}libdir2"])
action_in_first_dir = File.join(File::SEPARATOR, "libdir1", "agent", "spectester", "action.sh")
action_in_last_dir = File.join(File::SEPARATOR, "libdir2", "agent", "spectester", "action.sh")
File.expects("exist?").with(action_in_first_dir).returns(false)