spec/safely_spec.rb in safely-0.1.0pre vs spec/safely_spec.rb in safely-0.1.0

- old
+ new

@@ -25,18 +25,21 @@ it "should load Toadhopper if present" do Safely.load_strategies! defined?( Toadhopper ).should be_true end + + it "should load Mail if present" do + Safely.load_strategies! + + defined?( Mail ).should be_true + end end describe "usage" do it "should report exceptions to hoptoad" do - Safely.configure do |c| - c.hoptoad_key = "foo" - end - - Toadhopper.any_instance.expects(:post!) + Safely::Strategy::Hoptoad.expects(:report!) + Safely::Strategy::Mail.expects(:report!) safely do raise "Hello" end end