Sha256: f00ab638c059ac7bca575e17d18f2c242a25926cded381ce2ae2f59a00e94978
Contents?: true
Size: 890 Bytes
Versions: 15
Compression:
Stored size: 890 Bytes
Contents
require 'new_relic/control/frameworks/rails' class NewRelic::Control::Frameworks::Test < NewRelic::Control::Frameworks::Rails #:nodoc: def env 'test' end def app :rails end def initialize *args super setup_log end # when running tests, don't write out stderr def log!(msg, level=:info) log.send level, msg if log end # Add the default route in case it's missing. Need it for testing. def install_devmode_route super ActionController::Routing::RouteSet.class_eval do return if defined? draw_without_test_route def draw_with_test_route draw_without_test_route do | map | map.connect ':controller/:action/:id' yield map end end alias_method_chain :draw, :test_route end # Force the routes to be reloaded ActionController::Routing::Routes.reload! end end
Version data entries
15 entries across 15 versions & 2 rubygems