summaryrefslogtreecommitdiffstats
path: root/spec/unit/parser/functions/generate.rb
diff options
context:
space:
mode:
authorMarkus Roberts <Markus@reality.com>2010-06-23 15:51:08 -0700
committerMarkus Roberts <Markus@reality.com>2010-06-23 22:27:29 -0700
commit51b70c05167399eb2274fc1add18b6b18d31429d (patch)
tree1a33b11f0f589d6f5cd806d6da9de317887ca0e6 /spec/unit/parser/functions/generate.rb
parent9958c805dd90acadbb56ed3095e665d8afa990cd (diff)
downloadpuppet-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/parser/functions/generate.rb')
-rwxr-xr-xspec/unit/parser/functions/generate.rb41
1 files changed, 0 insertions, 41 deletions
diff --git a/spec/unit/parser/functions/generate.rb b/spec/unit/parser/functions/generate.rb
deleted file mode 100755
index 05c2cb7dc..000000000
--- a/spec/unit/parser/functions/generate.rb
+++ /dev/null
@@ -1,41 +0,0 @@
-#! /usr/bin/env ruby
-
-require File.dirname(__FILE__) + '/../../../spec_helper'
-
-describe "the generate function" do
-
- before :each do
- @scope = Puppet::Parser::Scope.new()
- end
-
- it "should exist" do
- Puppet::Parser::Functions.function("generate").should == "function_generate"
- end
-
- it "should accept a fully-qualified path as a command" do
- command = File::SEPARATOR + "command"
- Puppet::Util.expects(:execute).with([command]).returns("yay")
- lambda { @scope.function_generate([command]) }.should_not raise_error(Puppet::ParseError)
- end
-
- it "should not accept a relative path as a command" do
- command = "command"
- lambda { @scope.function_generate([command]) }.should raise_error(Puppet::ParseError)
- end
-
- # Really not sure how to implement this test, just sure it needs
- # to be implemented.
- it "should not accept a command containing illegal characters"
-
- it "should not accept a command containing '..'" do
- command = File::SEPARATOR + "command" + File::SEPARATOR + ".." + File::SEPARATOR
- lambda { @scope.function_generate([command]) }.should raise_error(Puppet::ParseError)
- end
-
- it "should execute the generate script with the correct working directory" do
- command = File::SEPARATOR + "command"
- Dir.expects(:chdir).with(File.dirname(command)).yields
- Puppet::Util.expects(:execute).with([command]).returns("yay")
- lambda { @scope.function_generate([command]) }.should_not raise_error(Puppet::ParseError)
- end
-end