summaryrefslogtreecommitdiff
path: root/spec/functions/concat_spec.rb
diff options
context:
space:
mode:
authorMorgan Haskel <morgan@puppetlabs.com>2014-06-05 16:16:34 -0400
committerMorgan Haskel <morgan@puppetlabs.com>2014-06-05 16:16:34 -0400
commitffe21fc67491c4502114505c82142781d72720ab (patch)
tree7f0ee09079863a19f07e0bb999e387eedb32e17e /spec/functions/concat_spec.rb
parentf9f6e92dffa8364cfbbd92a6a65f4be4ef176d2c (diff)
parent6287a200af558d277f83b919e8409f6c798eef39 (diff)
Merge pull request #268 from apenney/rspec3
Rspec3 changes
Diffstat (limited to 'spec/functions/concat_spec.rb')
-rwxr-xr-xspec/functions/concat_spec.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/spec/functions/concat_spec.rb b/spec/functions/concat_spec.rb
index 6e67620..b853b4c 100755
--- a/spec/functions/concat_spec.rb
+++ b/spec/functions/concat_spec.rb
@@ -5,26 +5,26 @@ describe "the concat function" do
let(:scope) { PuppetlabsSpec::PuppetInternals.scope }
it "should raise a ParseError if the client does not provide two arguments" do
- lambda { scope.function_concat([]) }.should(raise_error(Puppet::ParseError))
+ expect { scope.function_concat([]) }.to(raise_error(Puppet::ParseError))
end
it "should raise a ParseError if the first parameter is not an array" do
- lambda { scope.function_concat([1, []])}.should(raise_error(Puppet::ParseError))
+ expect { scope.function_concat([1, []])}.to(raise_error(Puppet::ParseError))
end
it "should be able to concat an array" do
result = scope.function_concat([['1','2','3'],['4','5','6']])
- result.should(eq(['1','2','3','4','5','6']))
+ expect(result).to(eq(['1','2','3','4','5','6']))
end
it "should be able to concat a primitive to an array" do
result = scope.function_concat([['1','2','3'],'4'])
- result.should(eq(['1','2','3','4']))
+ expect(result).to(eq(['1','2','3','4']))
end
it "should not accidentally flatten nested arrays" do
result = scope.function_concat([['1','2','3'],[['4','5'],'6']])
- result.should(eq(['1','2','3',['4','5'],'6']))
+ expect(result).to(eq(['1','2','3',['4','5'],'6']))
end
end