Added support for setting the debugger (-u flag)

This commit is contained in:
Joel Moss 2011-08-25 15:26:04 +01:00
parent 3dd64624d1
commit 585dc242d6
3 changed files with 11 additions and 1 deletions

View File

@ -13,7 +13,8 @@ module Guard
:start_on_start => true, :start_on_start => true,
:force_run => false, :force_run => false,
:timeout => 20, :timeout => 20,
:server => nil :server => nil,
:debugger => nil
} }
def initialize(watchers = [], options = {}) def initialize(watchers = [], options = {})

View File

@ -33,6 +33,7 @@ module Guard
rails_options = [ rails_options = [
'-e', options[:environment], '-e', options[:environment],
'-p', options[:port], '-p', options[:port],
'-u', options[:debugger],
'--pid', pid_file '--pid', pid_file
] ]

View File

@ -47,6 +47,14 @@ describe Guard::RailsRunner do
end end
end end
context 'debugger' do
let(:options) { default_options.merge(:debugger => true) }
it "should have a debugger switch" do
runner.build_rails_command.should match(%r{ -u})
end
end
context 'custom server' do context 'custom server' do
let(:options) { default_options.merge(:server => 'thin') } let(:options) { default_options.merge(:server => 'thin') }