spec/notify_airbrake_spec.rb in egregious-0.2.12 vs spec/notify_airbrake_spec.rb in egregious-0.2.13
- old
+ new
@@ -1,13 +1,23 @@
require 'spec_helper'
def rescue_from(exception, options)
end
-def env
+
+def airbrake_request_data
{}
end
+
+%w(env params session).each do |store|
+ eval <<-RX
+ def #{store}
+ {}
+ end
+ RX
+end
+
include Egregious
describe Egregious do
context "notify_airbrake 4" do
@@ -19,9 +29,14 @@
expect(Airbrake).to receive(:notify_or_ignore)
notify_airbrake(nil)
end
end
context "notify_airbrake 5" do
+ class Airbrake::Rack::NoticeBuilder
+ def initialize(env);end
+ def build_notice(exception);end
+ end
+
class << Airbrake
remove_method :notify_or_ignore
def self.notify(*params)
end
end
\ No newline at end of file