diff options
| author | Markus Roberts <Markus@reality.com> | 2010-06-28 16:32:11 -0700 |
|---|---|---|
| committer | Markus Roberts <Markus@reality.com> | 2010-06-28 16:32:11 -0700 |
| commit | 9ceb4540a567b0a9de85af5397df4a292303a9c3 (patch) | |
| tree | 30d1e1601888381baaaa14bfc5ee7246fd5c78e8 /spec/unit/parser/functions/split_spec.rb | |
| parent | 85638cf427fe9b35d3e3b0fa4ce919c5806c60d3 (diff) | |
| download | puppet-9ceb4540a567b0a9de85af5397df4a292303a9c3.tar.gz puppet-9ceb4540a567b0a9de85af5397df4a292303a9c3.tar.xz puppet-9ceb4540a567b0a9de85af5397df4a292303a9c3.zip | |
[#3994-part 2] rename integration tests to *_spec.rb
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/split_spec.rb')
| -rwxr-xr-x | spec/unit/parser/functions/split_spec.rb | 51 |
1 files changed, 0 insertions, 51 deletions
diff --git a/spec/unit/parser/functions/split_spec.rb b/spec/unit/parser/functions/split_spec.rb deleted file mode 100755 index 8aa031d19..000000000 --- a/spec/unit/parser/functions/split_spec.rb +++ /dev/null @@ -1,51 +0,0 @@ -#! /usr/bin/env ruby - -require File.dirname(__FILE__) + '/../../../spec_helper' - -describe "the split function" do - - before :each do - @scope = Puppet::Parser::Scope.new() - end - - it "should exist" do - Puppet::Parser::Functions.function("split").should == "function_split" - end - - it "should raise a ParseError if there is less than 2 arguments" do - lambda { @scope.function_split(["foo"]) }.should( - raise_error(Puppet::ParseError)) - end - - it "should raise a ParseError if there is more than 2 arguments" do - lambda { @scope.function_split(["foo", "bar", "gazonk"]) }.should( - raise_error(Puppet::ParseError)) - end - - it "should raise a RegexpError if the regexp is malformed" do - lambda { @scope.function_split(["foo", "("]) }.should( - raise_error(RegexpError)) - end - - - it "should handle simple string without metacharacters" do - result = @scope.function_split([ "130;236;254;10", ";"]) - result.should(eql(["130", "236", "254", "10"])) - end - - it "should handle simple regexps" do - result = @scope.function_split([ "130.236;254.;10", "[.;]+"]) - result.should(eql(["130", "236", "254", "10"])) - end - - it "should handle groups" do - result = @scope.function_split([ "130.236;254.;10", "([.;]+)"]) - result.should(eql(["130", ".", "236", ";", "254", ".;", "10"])) - end - - it "should handle simple string without metacharacters" do - result = @scope.function_split([ "130.236.254.10", ";"]) - result.should(eql(["130.236.254.10"])) - end - -end |
