Skip to content

Commit

Permalink
Check for specific exceptions in tests to suppress rspec warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
asedge committed Jul 21, 2015
1 parent 65f485d commit 9946c7d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion spec/gitlab/cli_helpers_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
context "when input is NOT valid YAML" do
it "should raise" do
ruby_array = [1, 2, 3, 4]
expect { Gitlab::CLI::Helpers.yaml_load ruby_array}.to raise_exception
expect { Gitlab::CLI::Helpers.yaml_load ruby_array}.to raise_error TypeError
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion spec/gitlab/help_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
context "ri command NOT found" do
it "should raise" do
allow(Gitlab::Help).to receive(:`).with(/which ri/).and_return('')
expect{Gitlab::Help.ri_cmd}.to raise_error
expect{Gitlab::Help.ri_cmd}.to raise_error RuntimeError
end
end

Expand Down

0 comments on commit 9946c7d

Please sign in to comment.