Do not use ShowExceptions during tests, it confuses things
This commit is contained in:
parent
f07bed4ecf
commit
f63feaf017
2 changed files with 7 additions and 6 deletions
|
@ -1,14 +1,16 @@
|
|||
require 'rack/showexceptions'
|
||||
|
||||
# Support rack/showexceptions during development
|
||||
module Middleman::CoreExtensions
|
||||
class ShowExceptions < ::Middleman::Extension
|
||||
def initialize(app, options_hash={}, &block)
|
||||
super
|
||||
|
||||
require 'rack/showexceptions'
|
||||
app.config.define_setting :show_exceptions, true, 'Whether to catch and display exceptions'
|
||||
end
|
||||
|
||||
def after_configuration
|
||||
app.use ::Rack::ShowExceptions
|
||||
app.use ::Rack::ShowExceptions if app.config[:show_exceptions]
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -41,12 +41,11 @@ Given /^the Server is running$/ do
|
|||
ENV['MM_ROOT'] = root_dir
|
||||
|
||||
initialize_commands = @initialize_commands || []
|
||||
initialize_commands.unshift lambda { config[:show_exceptions] = false }
|
||||
|
||||
@server_inst = Middleman::Application.server.inst do
|
||||
app.initialized do
|
||||
initialize_commands.each do |p|
|
||||
config_context.instance_exec(&p)
|
||||
end
|
||||
initialize_commands.each do |p|
|
||||
instance_exec(&p)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue