spec/unit/parser/functions/sprintf.rb in puppet-0.24.9 vs spec/unit/parser/functions/sprintf.rb in puppet-0.25.0

- old
+ new

@@ -12,31 +12,31 @@ Puppet::Parser::Functions.function("sprintf").should == "function_sprintf" end it "should raise a ParseError if there is less than 1 argument" do lambda { @scope.function_sprintf([]) }.should( - raise_error(Puppet::ParseError)) + raise_error(Puppet::ParseError)) end it "should format integers" do - result = @scope.function_sprintf(["%+05d", "23"]) - result.should(eql("+0023")) + result = @scope.function_sprintf(["%+05d", "23"]) + result.should(eql("+0023")) end it "should format floats" do - result = @scope.function_sprintf(["%+.2f", "2.7182818284590451"]) - result.should(eql("+2.72")) + result = @scope.function_sprintf(["%+.2f", "2.7182818284590451"]) + result.should(eql("+2.72")) end it "should format large floats" do - result = @scope.function_sprintf(["%+.2e", "27182818284590451"]) - result.should(eql("+2.72e+16")) + result = @scope.function_sprintf(["%+.2e", "27182818284590451"]) + result.should(eql("+2.72e+16")) end it "should perform more complex formatting" do - result = @scope.function_sprintf( - [ "<%.8s:%#5o %#8X (%-8s)>", - "overlongstring", "23", "48879", "foo" ]) - result.should(eql("<overlong: 027 0XBEEF (foo )>")) + result = @scope.function_sprintf( + [ "<%.8s:%#5o %#8X (%-8s)>", + "overlongstring", "23", "48879", "foo" ]) + result.should(eql("<overlong: 027 0XBEEF (foo )>")) end end