diff options
Diffstat (limited to 'spec/unit/parser')
-rwxr-xr-x | spec/unit/parser/compiler_spec.rb | 2 | ||||
-rwxr-xr-x | spec/unit/parser/functions/generate_spec.rb | 2 | ||||
-rwxr-xr-x | spec/unit/parser/scope_spec.rb | 10 |
3 files changed, 7 insertions, 7 deletions
diff --git a/spec/unit/parser/compiler_spec.rb b/spec/unit/parser/compiler_spec.rb index 31dc196ef..872cd7961 100755 --- a/spec/unit/parser/compiler_spec.rb +++ b/spec/unit/parser/compiler_spec.rb @@ -16,7 +16,7 @@ class CompilerTestResource end def ref - "%s[%s]" % [type.to_s.capitalize, title] + "#{type.to_s.capitalize}[#{title}]" end def evaluated? diff --git a/spec/unit/parser/functions/generate_spec.rb b/spec/unit/parser/functions/generate_spec.rb index 05c2cb7dc..75a5d6dac 100755 --- a/spec/unit/parser/functions/generate_spec.rb +++ b/spec/unit/parser/functions/generate_spec.rb @@ -28,7 +28,7 @@ describe "the generate function" do 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 + command = File::SEPARATOR + "command#{File::SEPARATOR}..#{File::SEPARATOR}" lambda { @scope.function_generate([command]) }.should raise_error(Puppet::ParseError) end diff --git a/spec/unit/parser/scope_spec.rb b/spec/unit/parser/scope_spec.rb index 94192a693..c394282ca 100755 --- a/spec/unit/parser/scope_spec.rb +++ b/spec/unit/parser/scope_spec.rb @@ -471,7 +471,7 @@ describe Puppet::Parser::Scope do # #523 %w{d f h l w z}.each do |l| it "should parse '#{l}' when escaped" do - string = "\\" + l + string = "\\#{l}" @scope.strinterp(string).should == string end end @@ -494,12 +494,12 @@ describe Puppet::Parser::Scope do klass = parser.newclass(name) Puppet::Parser::Resource.new(:type => "class", :title => name, :scope => scope, :source => mock('source')).evaluate scopes[name] = scope.class_scope(klass) - scopes[name].setvar("test", "value-%s" % name.sub(/.+::/,'')) + scopes[name].setvar("test", "value-#{name.sub(/.+::/,'')}") end assert_equal("value", scope.lookupvar("::test"), "did not look up qualified value correctly") tests.each do |input, output| - assert_nothing_raised("Failed to scan %s" % input.inspect) do + assert_nothing_raised("Failed to scan #{input.inspect}") do assert_equal(output, scope.strinterp(input), 'did not parserret %s correctly' % input.inspect) end end @@ -510,7 +510,7 @@ describe Puppet::Parser::Scope do # #523 %w{d f h l w z}.each do |l| - string = "\\" + l + string = "\\#{l}" assert_nothing_raised do assert_equal( @@ -523,7 +523,7 @@ describe Puppet::Parser::Scope do assert( logs.detect { |m| m.message =~ /Unrecognised escape/ }, - "Did not get warning about escape sequence with %s" % string) + "Did not get warning about escape sequence with #{string}") logs.clear end end |