Permalink
Browse files

spec fixes

  • Loading branch information...
1 parent ea7e18d commit 8fc3e98b1cc26f44ea65927edf6238fb05c1988a @mackuba committed Mar 24, 2014
Showing with 6 additions and 6 deletions.
  1. +3 −3 spec/offline_database_spec.rb
  2. +3 −3 spec/online_database_spec.rb
@@ -13,10 +13,10 @@ module HolePicker
before { create_file(path, json.to_json) }
it "should load the database from the default json file" do
- db = OfflineDatabase.load
+ expect { @db = OfflineDatabase.load }.not_to raise_error
- db.should be_a(OfflineDatabase)
- db.vulnerabilities.map(&:url).should == vulnerabilities.map { |v| v['url'] }.reverse
+ @db.should be_a(OfflineDatabase)
+ @db.vulnerabilities.map(&:url).should == vulnerabilities.map { |v| v['url'] }.reverse
end
end
@@ -48,7 +48,7 @@ module HolePicker
before { OnlineDatabase.any_instance.stubs(:compatible? => true) }
it "should not exit" do
- expect { OnlineDatabase.load }.not_to raise_error(SystemExit)
+ expect { OnlineDatabase.load }.not_to raise_error
end
it "should not print any error message" do
@@ -62,7 +62,7 @@ module HolePicker
before { OnlineDatabase.any_instance.stubs(:compatible? => false) }
it "should exit" do
- expect { OnlineDatabase.load }.to raise_error(SystemExit)
+ expect { OnlineDatabase.load }.to raise_error
end
it "should print an error message" do
@@ -76,7 +76,7 @@ module HolePicker
before { stub_request(:get, OnlineDatabase::URL).to_timeout }
it "should exit" do
- expect { OnlineDatabase.load }.to raise_error(SystemExit)
+ expect { OnlineDatabase.load }.to raise_error
end
it "should print an error message" do

0 comments on commit 8fc3e98

Please sign in to comment.