2012-10-31 04:24:06 -04:00
|
|
|
require 'helper'
|
|
|
|
|
|
|
|
describe "disable-pry" do
|
|
|
|
before do
|
|
|
|
@t = pry_tester
|
|
|
|
end
|
|
|
|
|
|
|
|
after do
|
2012-10-31 04:42:55 -04:00
|
|
|
ENV.delete 'DISABLE_PRY'
|
2012-10-31 04:24:06 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
it 'should quit the current session' do
|
|
|
|
lambda{
|
|
|
|
@t.process_command 'disable-pry'
|
|
|
|
}.should.throw(:breakout)
|
|
|
|
end
|
|
|
|
|
2012-10-31 04:42:55 -04:00
|
|
|
it "should set DISABLE_PRY" do
|
|
|
|
ENV['DISABLE_PRY'].should == nil
|
2012-10-31 04:24:06 -04:00
|
|
|
lambda{
|
|
|
|
@t.process_command 'disable-pry'
|
|
|
|
}.should.throw(:breakout)
|
2012-10-31 04:42:55 -04:00
|
|
|
ENV['DISABLE_PRY'].should == 'true'
|
2012-10-31 04:24:06 -04:00
|
|
|
end
|
|
|
|
end
|