From 08840356c88c2478f523189e668eb96e410e27e6 Mon Sep 17 00:00:00 2001 From: Jesse Wolfe Date: Sun, 20 Dec 2009 19:26:55 -0800 Subject: Fix #2970 spec/unit/provider/ssh_authorized_key/parsed.rb has order dependencies Some tests in this file were leaking a global setting, some other tests depended on those changes, and some tests were incompatible with that setting. Signed-off-by: Jesse Wolfe --- spec/unit/provider/ssh_authorized_key/parsed.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'spec/unit/provider') diff --git a/spec/unit/provider/ssh_authorized_key/parsed.rb b/spec/unit/provider/ssh_authorized_key/parsed.rb index 49abc13ec..9abcda54f 100755 --- a/spec/unit/provider/ssh_authorized_key/parsed.rb +++ b/spec/unit/provider/ssh_authorized_key/parsed.rb @@ -33,7 +33,7 @@ describe provider_class do end def genkey(key) - @provider.filetype = :ram + @provider.stubs(:filetype).returns(Puppet::Util::FileType::FileTypeRam) file = @provider.default_target key.flush @@ -90,7 +90,9 @@ describe provider_class do before :each do @resource = stub("resource", :name => "foo") @resource.stubs(:[]).returns "foo" + @provider = provider_class.new(@resource) + provider_class.stubs(:filetype).returns(Puppet::Util::FileType::FileTypeRam) end describe "when flushing" do -- cgit