diff options
| author | Luke Kanies <luke@madstop.com> | 2007-10-05 11:46:35 -0500 |
|---|---|---|
| committer | Luke Kanies <luke@madstop.com> | 2007-10-05 11:46:35 -0500 |
| commit | 9c58c476c2ffcf9613f14e5881b1177f01d413a7 (patch) | |
| tree | 8791274ce754f486f039ba942e3a5d3d9939df3e /spec/unit/indirector/code | |
| parent | d35cd947c82ba9da8ec798100a3c710c34492521 (diff) | |
| download | puppet-9c58c476c2ffcf9613f14e5881b1177f01d413a7.tar.gz puppet-9c58c476c2ffcf9613f14e5881b1177f01d413a7.tar.xz puppet-9c58c476c2ffcf9613f14e5881b1177f01d413a7.zip | |
Adding a :code setting for specifying code to run
instead of a manifest, and removing all of the ambiguity
around whether an interpreter gets its own file specified
or uses the central setting.
Most of the changes are around fixing existing tests to use this new system.
Diffstat (limited to 'spec/unit/indirector/code')
| -rwxr-xr-x | spec/unit/indirector/code/configuration.rb | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/spec/unit/indirector/code/configuration.rb b/spec/unit/indirector/code/configuration.rb index 5e2aedc7b..bc54f4e1c 100755 --- a/spec/unit/indirector/code/configuration.rb +++ b/spec/unit/indirector/code/configuration.rb @@ -53,28 +53,16 @@ describe Puppet::Indirector::Code::Configuration, " when creating the interprete it "should not create the interpreter until it is asked for the first time" do interp = mock 'interp' - Puppet::Parser::Interpreter.expects(:new).with({}).returns(interp) + Puppet::Parser::Interpreter.expects(:new).with().returns(interp) @compiler.interpreter.should equal(interp) end it "should use the same interpreter for all compiles" do interp = mock 'interp' - Puppet::Parser::Interpreter.expects(:new).with({}).returns(interp) + Puppet::Parser::Interpreter.expects(:new).with().returns(interp) @compiler.interpreter.should equal(interp) @compiler.interpreter.should equal(interp) end - - it "should provide a mechanism for setting the code to pass to the interpreter" do - @compiler.should respond_to(:code=) - end - - it "should pass any specified code on to the interpreter when it is being initialized" do - code = "some code" - @compiler.code = code - interp = mock 'interp' - Puppet::Parser::Interpreter.expects(:new).with(:Code => code).returns(interp) - @compiler.send(:interpreter).should equal(interp) - end end describe Puppet::Indirector::Code::Configuration, " when finding nodes" do |
