spec/unit/face/node_spec.rb in puppet-2.7.26 vs spec/unit/face/node_spec.rb in puppet-3.0.0.rc4
- old
+ new
@@ -1,6 +1,6 @@
-#!/usr/bin/env rspec
+#! /usr/bin/env ruby -S rspec
require 'spec_helper'
require 'puppet/face'
describe Puppet::Face[:node, '0.0.1'] do
after :all do
@@ -86,11 +86,11 @@
subject.clean('hostname')
end
it "should run in master mode" do
subject.clean('hostname')
- $puppet_application_mode.name.should == :master
+ Puppet[:run_mode].should == :master
end
it "should set node cache as yaml" do
Puppet::Node.indirection.expects(:terminus_class=).with(:yaml)
Puppet::Node.indirection.expects(:cache_class=).with(:yaml)
@@ -160,10 +160,10 @@
describe "when cleaning storeconfigs entries for host", :if => Puppet.features.rails? do
before :each do
# Stub this so we don't need access to the DB
require 'puppet/rails/host'
- Puppet.stubs(:[]).with(:storeconfigs).returns(true)
+ Puppet[:storeconfigs] = true
Puppet::Rails.stubs(:connect)
@rails_node = stub_everything 'rails_node'
Puppet::Rails::Host.stubs(:find_by_name).returns(@rails_node)
end