File: disable_pry_spec.rb

package info (click to toggle)
pry 0.10.1-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 1,792 kB
  • ctags: 1,704
  • sloc: ruby: 17,668; makefile: 16
file content (25 lines) | stat: -rw-r--r-- 473 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
require_relative '../helper'

describe "disable-pry" do
  before do
    @t = pry_tester
  end

  after do
    ENV.delete 'DISABLE_PRY'
  end

  it 'should quit the current session' do
    lambda{
      @t.process_command 'disable-pry'
    }.should.throw(:breakout)
  end

  it "should set DISABLE_PRY" do
    ENV['DISABLE_PRY'].should == nil
    lambda{
      @t.process_command 'disable-pry'
    }.should.throw(:breakout)
    ENV['DISABLE_PRY'].should == 'true'
  end
end