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,
:force_run => false,
:timeout => 20,
:server => nil
:server => nil,
:debugger => nil
}
def initialize(watchers = [], options = {})

View File

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

View File

@ -46,6 +46,14 @@ describe Guard::RailsRunner do
runner.build_rails_command.should match(%r{ -d})
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
let(:options) { default_options.merge(:server => 'thin') }