Permalink
Browse files

13939 - Fix instances of "parenthesize argument(s) for future version…

…" on 1.8.5

Fix various cases of "parenthesize argument(s) for future version"
errors in the spec tests for ruby 1.8.5
  • Loading branch information...
1 parent 5cbf0f3 commit ebd6769a08bc85ee19798a6d60395bba2ef983c3 @ripienaar committed Apr 13, 2012
@@ -66,7 +66,7 @@ def initialize
expect{
ospackage = OspackagePackager.new(@testplugin)
- }.to raise_exception "error: cannot identify operating system."
+ }.to raise_exception("error: cannot identify operating system.")
end
it "should identify if rpmbuild is present for RedHat systems" do
@@ -80,7 +80,7 @@ def initialize
File.expects(:exists?).with("./rpmbuild").returns(false)
expect{
ospackage = OspackagePackager.new(@testplugin)
- }.to raise_error "error: package 'rpm-build' is not installed."
+ }.to raise_error("error: package 'rpm-build' is not installed.")
end
it "should identify if ar is present for Debian systems" do
@@ -97,7 +97,7 @@ def initialize
File.expects(:exists?).with("./ar").returns(false)
expect{
ospackage = OspackagePackager.new(@testplugin)
- }.to raise_error "error: package 'ar' is not installed."
+ }.to raise_error("error: package 'ar' is not installed.")
end
end
@@ -159,9 +159,9 @@ module RPC
end
it "should not invalid limits to be set" do
- expect { @client.limit_targets = "a" }.to raise_error /Invalid/
- expect { @client.limit_targets = "%1" }.to raise_error /Invalid/
- expect { @client.limit_targets = "1.1" }.to raise_error /Invalid/
+ expect { @client.limit_targets = "a" }.to raise_error(/Invalid/)
+ expect { @client.limit_targets = "%1" }.to raise_error(/Invalid/)
+ expect { @client.limit_targets = "1.1" }.to raise_error(/Invalid/)
end
end
@@ -9,23 +9,23 @@ module RPC
it "should fail for non array data" do
expect {
Helpers.extract_hosts_from_json("{}")
- }.to raise_error "JSON hosts list is not an array"
+ }.to raise_error("JSON hosts list is not an array")
end
it "should fail for non hash array members" do
senders = [{"sender" => "sender1"}, {"sender" => "sender3"}, ""].to_json
expect {
Helpers.extract_hosts_from_json(senders)
- }.to raise_error "JSON host list is not an array of Hashes"
+ }.to raise_error("JSON host list is not an array of Hashes")
end
it "should fail for hashes without senders" do
senders = [{"sender" => "sender1"}, {"sender" => "sender3"}, {}].to_json
expect {
Helpers.extract_hosts_from_json(senders)
- }.to raise_error "JSON host list does not have senders in it"
+ }.to raise_error("JSON host list does not have senders in it")
end
it "should return all found unique senders" do
@@ -35,7 +35,7 @@ module Security
expect {
@plugin.should_process_msg?(m, "fail").should == true
- }.to raise_error MsgDoesNotMatchRequestID
+ }.to raise_error(MsgDoesNotMatchRequestID)
end
it "should not test messages without expected_msgid" do
View
@@ -93,7 +93,7 @@ module MCollective
end
it "should read the public key from a certificate" do
- @ssl.read_key(:public, "#{@rootdir}/../fixtures/test-cert.pem").to_s.should match /.+BEGIN.+PUBLIC KEY.+END.+PUBLIC KEY.+/m
+ @ssl.read_key(:public, "#{@rootdir}/../fixtures/test-cert.pem").to_s.should match(/.+BEGIN.+PUBLIC KEY.+END.+PUBLIC KEY.+/m)
end
it "should return nil if no key was given" do

0 comments on commit ebd6769

Please sign in to comment.