summaryrefslogtreecommitdiff
path: root/spec/functions/max_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/max_spec.rb
parentf9f6e92dffa8364cfbbd92a6a65f4be4ef176d2c (diff)
parent6287a200af558d277f83b919e8409f6c798eef39 (diff)
Merge pull request #268 from apenney/rspec3
Rspec3 changes
Diffstat (limited to 'spec/functions/max_spec.rb')
-rwxr-xr-xspec/functions/max_spec.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/spec/functions/max_spec.rb b/spec/functions/max_spec.rb
index ff6f2b3..c3d8a13 100755
--- a/spec/functions/max_spec.rb
+++ b/spec/functions/max_spec.rb
@@ -6,22 +6,22 @@ describe "the max function" do
let(:scope) { PuppetlabsSpec::PuppetInternals.scope }
it "should exist" do
- Puppet::Parser::Functions.function("max").should == "function_max"
+ expect(Puppet::Parser::Functions.function("max")).to eq("function_max")
end
it "should raise a ParseError if there is less than 1 arguments" do
- lambda { scope.function_max([]) }.should( raise_error(Puppet::ParseError))
+ expect { scope.function_max([]) }.to( raise_error(Puppet::ParseError))
end
it "should be able to compare strings" do
- scope.function_max(["albatross","dog","horse"]).should(eq("horse"))
+ expect(scope.function_max(["albatross","dog","horse"])).to(eq("horse"))
end
it "should be able to compare numbers" do
- scope.function_max([6,8,4]).should(eq(8))
+ expect(scope.function_max([6,8,4])).to(eq(8))
end
it "should be able to compare a number with a stringified number" do
- scope.function_max([1,"2"]).should(eq("2"))
+ expect(scope.function_max([1,"2"])).to(eq("2"))
end
end