diff options
author | Luke Kanies <luke@madstop.com> | 2009-04-08 16:56:41 -0500 |
---|---|---|
committer | James Turnbull <james@lovedthanlost.net> | 2009-04-22 14:39:36 +1000 |
commit | 6314745c054ba9482f145b4ec798431ac2f300a3 (patch) | |
tree | 851f037a5aad8af01949ea8e9d82c369f1c9a2b6 /spec/unit | |
parent | be30a618272d9828f90f5e726a23021be3b23221 (diff) | |
download | puppet-6314745c054ba9482f145b4ec798431ac2f300a3.tar.gz puppet-6314745c054ba9482f145b4ec798431ac2f300a3.tar.xz puppet-6314745c054ba9482f145b4ec798431ac2f300a3.zip |
Refactoring the Rails integration
This moves all code from the Parser class into
the ActiveRecord classes, and gets rid of
'ar_hash_merge'.
Signed-off-by: Luke Kanies <luke@madstop.com>
Diffstat (limited to 'spec/unit')
-rwxr-xr-x | spec/unit/indirector/catalog/active_record.rb | 4 | ||||
-rwxr-xr-x | spec/unit/indirector/facts/active_record.rb | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/spec/unit/indirector/catalog/active_record.rb b/spec/unit/indirector/catalog/active_record.rb index b8571e5b8..948b811d3 100755 --- a/spec/unit/indirector/catalog/active_record.rb +++ b/spec/unit/indirector/catalog/active_record.rb @@ -75,7 +75,7 @@ describe Puppet::Node::Catalog::ActiveRecord do describe "when saving an instance" do before do - @host = stub 'host', :name => "foo", :save => nil, :setresources => nil, :last_compile= => nil + @host = stub 'host', :name => "foo", :save => nil, :merge_resources => nil, :last_compile= => nil Puppet::Rails::Host.stubs(:find_by_name).returns @host @catalog = Puppet::Node::Catalog.new("foo") @request = stub 'request', :key => "foo", :instance => @catalog @@ -97,7 +97,7 @@ describe Puppet::Node::Catalog::ActiveRecord do it "should set the catalog vertices as resources on the Rails host instance" do @catalog.expects(:vertices).returns "foo" - @host.expects(:setresources).with("foo") + @host.expects(:merge_resources).with("foo") @terminus.save(@request) end diff --git a/spec/unit/indirector/facts/active_record.rb b/spec/unit/indirector/facts/active_record.rb index 340f2cf4c..fc35f1a45 100755 --- a/spec/unit/indirector/facts/active_record.rb +++ b/spec/unit/indirector/facts/active_record.rb @@ -67,7 +67,7 @@ describe Puppet::Node::Facts::ActiveRecord do describe "when saving an instance" do before do - @host = stub 'host', :name => "foo", :save => nil, :setfacts => nil + @host = stub 'host', :name => "foo", :save => nil, :merge_facts => nil Puppet::Rails::Host.stubs(:find_by_name).returns @host @facts = Puppet::Node::Facts.new("foo", "one" => "two", "three" => "four") @request = stub 'request', :key => "foo", :instance => @facts @@ -89,7 +89,7 @@ describe Puppet::Node::Facts::ActiveRecord do it "should set the facts as facts on the Rails host instance" do # There is other stuff added to the hash. - @host.expects(:setfacts).with { |args| args["one"] == "two" and args["three"] == "four" } + @host.expects(:merge_facts).with { |args| args["one"] == "two" and args["three"] == "four" } @terminus.save(@request) end |