diff options
| author | Jacob Helwig <jacob@puppetlabs.com> | 2011-06-28 19:19:10 -0700 |
|---|---|---|
| committer | Jacob Helwig <jacob@puppetlabs.com> | 2011-06-28 19:19:10 -0700 |
| commit | 902c4147a2100c1f71d8493c526ae5275bab4cdc (patch) | |
| tree | 032d841dcb809401c9babfe46ced43b0720db917 | |
| parent | 8432684e25cc82beb1f5d977dd509fd7bab3901b (diff) | |
| download | puppet-902c4147a2100c1f71d8493c526ae5275bab4cdc.tar.gz puppet-902c4147a2100c1f71d8493c526ae5275bab4cdc.tar.xz puppet-902c4147a2100c1f71d8493c526ae5275bab4cdc.zip | |
Update configurer_spec.rb to work with Ruby 1.8.5
Ruby 1.8.5 doesn't have start_with? on String, so instead of checking
the log message using start_with? we check using a regex.
Reviewed-by: Nick Lewis <nick@puppetlabs.com>
| -rwxr-xr-x | spec/unit/configurer_spec.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/unit/configurer_spec.rb b/spec/unit/configurer_spec.rb index f8a486928..020d1850f 100755 --- a/spec/unit/configurer_spec.rb +++ b/spec/unit/configurer_spec.rb @@ -244,7 +244,7 @@ describe Puppet::Configurer do Puppet.settings[:prerun_command] = "/my/command" Puppet::Util.expects(:execute).with(["/my/command"]).raises(Puppet::ExecutionFailure, "Failed") - report.expects(:<<).with { |log| log.message.start_with?("Could not run command from prerun_command") } + report.expects(:<<).with { |log| log.message =~ /^Could not run command from prerun_command/ } @agent.run.should be_nil end @@ -267,7 +267,7 @@ describe Puppet::Configurer do Puppet.settings[:postrun_command] = "/my/command" Puppet::Util.expects(:execute).with(["/my/command"]).raises(Puppet::ExecutionFailure, "Failed") - report.expects(:<<).with { |log| log.message.start_with?("Could not run command from postrun_command") } + report.expects(:<<).with { |log| log.message =~ /^Could not run command from postrun_command/ } @agent.run.should be_nil end |
