spec/unit/file_serving/mount/modules_spec.rb in puppet-2.6.16 vs spec/unit/file_serving/mount/modules_spec.rb in puppet-2.6.17

- old
+ new

@@ -10,10 +10,14 @@ @environment = stub 'environment', :module => nil @request = stub 'request', :environment => @environment end describe "when finding files" do + it "should fail if no module is specified" do + expect { @mount.find("", @request) }.to raise_error(/No module specified/) + end + it "should use the provided environment to find the module" do @environment.expects(:module) @mount.find("foo", @request) end @@ -35,9 +39,13 @@ @mount.find("foo/bar/baz", @request).should == "eh" end end describe "when searching for files" do + it "should fail if no module is specified" do + expect { @mount.find("", @request) }.to raise_error(/No module specified/) + end + it "should use the node's environment to search the module" do @environment.expects(:module) @mount.search("foo", @request) end