summaryrefslogtreecommitdiffstats
path: root/spec/unit/indirector/yaml_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/unit/indirector/yaml_spec.rb')
-rwxr-xr-xspec/unit/indirector/yaml_spec.rb13
1 files changed, 7 insertions, 6 deletions
diff --git a/spec/unit/indirector/yaml_spec.rb b/spec/unit/indirector/yaml_spec.rb
index 35017991b..188e300d6 100755
--- a/spec/unit/indirector/yaml_spec.rb
+++ b/spec/unit/indirector/yaml_spec.rb
@@ -5,14 +5,15 @@ require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper')
require 'puppet/indirector/yaml'
describe Puppet::Indirector::Yaml, " when choosing file location" do
- before :each do
+ before :all do
@indirection = stub 'indirection', :name => :my_yaml, :register_terminus_type => nil
- Puppet::Indirector::Indirection.stubs(:instance).with(:my_yaml).returns(@indirection)
- @store_class = Class.new(Puppet::Indirector::Yaml) do
- def self.to_s
- "MyYaml::MyType"
- end
+ Puppet::Indirector::Indirection.expects(:instance).with(:my_yaml).returns(@indirection)
+ module MyYaml; end
+ @store_class = class MyYaml::MyType < Puppet::Indirector::Yaml
+ self
end
+ end
+ before :each do
@store = @store_class.new
@subject = Object.new