diff options
author | Markus Roberts <Markus@reality.com> | 2010-06-23 15:51:08 -0700 |
---|---|---|
committer | Markus Roberts <Markus@reality.com> | 2010-06-23 22:27:29 -0700 |
commit | 51b70c05167399eb2274fc1add18b6b18d31429d (patch) | |
tree | 1a33b11f0f589d6f5cd806d6da9de317887ca0e6 /spec/unit/file_serving/mount_spec.rb | |
parent | 9958c805dd90acadbb56ed3095e665d8afa990cd (diff) | |
download | puppet-51b70c05167399eb2274fc1add18b6b18d31429d.tar.gz puppet-51b70c05167399eb2274fc1add18b6b18d31429d.tar.xz puppet-51b70c05167399eb2274fc1add18b6b18d31429d.zip |
[#3994] rename the specs to have _spec.rb at the end
Some spec files like active_record.rb had names that would confuse the
load path and get loaded instead of the intended implentation when the
spec was run from the same directory as the file.
Author: Matt Robinson <matt@puppetlabs.com>
Date: Fri Jun 11 15:29:33 2010 -0700
Diffstat (limited to 'spec/unit/file_serving/mount_spec.rb')
-rwxr-xr-x | spec/unit/file_serving/mount_spec.rb | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/spec/unit/file_serving/mount_spec.rb b/spec/unit/file_serving/mount_spec.rb new file mode 100755 index 000000000..cbb97b0d9 --- /dev/null +++ b/spec/unit/file_serving/mount_spec.rb @@ -0,0 +1,32 @@ +#!/usr/bin/env ruby + +require File.dirname(__FILE__) + '/../../spec_helper' +require 'puppet/file_serving/mount' + +describe Puppet::FileServing::Mount do + it "should use 'mount[$name]' as its string form" do + Puppet::FileServing::Mount.new("foo").to_s.should == "mount[foo]" + end +end + +describe Puppet::FileServing::Mount, " when initializing" do + it "should fail on non-alphanumeric name" do + proc { Puppet::FileServing::Mount.new("non alpha") }.should raise_error(ArgumentError) + end + + it "should allow dashes in its name" do + Puppet::FileServing::Mount.new("non-alpha").name.should == "non-alpha" + end +end + +describe Puppet::FileServing::Mount, " when finding files" do + it "should fail" do + lambda { Puppet::FileServing::Mount.new("test").find("foo", :one => "two") }.should raise_error(NotImplementedError) + end +end + +describe Puppet::FileServing::Mount, " when searching for files" do + it "should fail" do + lambda { Puppet::FileServing::Mount.new("test").search("foo", :one => "two") }.should raise_error(NotImplementedError) + end +end |