blob: 8fb61d96253cd07fa0fdb383b4cf1d7e2d4a7c5f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
#!/usr/bin/env rspec
require 'spec_helper'
require 'puppet/indirector/run/local'
describe Puppet::Run::Local do
it "should be a sublcass of Puppet::Indirector::Code" do
Puppet::Run::Local.superclass.should equal(Puppet::Indirector::Code)
end
it "should call runner.run on save and return the runner" do
runner = Puppet::Run.new
runner.stubs(:run).returns(runner)
request = Puppet::Indirector::Request.new(:indirection, :save, "anything")
request.instance = runner = Puppet::Run.new
Puppet::Run::Local.new.save(request).should == runner
end
end
|