test/helper.rb in hydraulic_brake-0.1.0 vs test/helper.rb in hydraulic_brake-0.2.0

- old
+ new

@@ -1,16 +1,19 @@ require 'simplecov' -SimpleCov.start +SimpleCov.start do + add_filter '/test/' +end require 'test/unit' require 'rubygems' $LOAD_PATH << File.expand_path(File.join(File.dirname(__FILE__), "..", "lib")) +require 'mocha/setup' +require 'bourne' require 'shoulda' require 'nokogiri' -require 'bourne' -require "hydraulic_brake" +require 'hydraulic_brake' begin require 'redgreen'; rescue LoadError; end module TestMethods def rescue_action e @@ -91,10 +94,11 @@ def reset_config HydraulicBrake.configuration = nil HydraulicBrake.configure do |config| config.api_key = 'abc123' + config.logger = FakeLogger.new end end def clear_backtrace_filters HydraulicBrake.configuration.backtrace_filters.clear @@ -124,9 +128,13 @@ :session => { :key => '123abc', :data => { 'user_id' => '5', 'flash' => { 'notice' => 'Logged in successfully' } } } } + end + + def build_notice(exception = nil) + HydraulicBrake::Notice.new(build_notice_data(exception)) end def assert_caught_and_sent assert !HydraulicBrake.sender.collected.empty? end