Sha256: ba06fd1add94342ee45d9834c095a02a4a4c08d98db9b0aee7b9b25e2fcecf49

Contents?: true

Size: 433 Bytes

Versions: 44

Compression:

Stored size: 433 Bytes

Contents

require "helper"
require "thor/base"

describe "Exit conditions" do
  it "exits 0, not bubble up EPIPE, if EPIPE is raised" do
    epiped = false

    command = Class.new(Thor) do
      desc "my_action", "testing EPIPE"
      define_method :my_action do
        epiped = true
        fail Errno::EPIPE
      end
    end

    expect { command.start(["my_action"]) }.to raise_error(SystemExit)
    expect(epiped).to eq(true)
  end
end

Version data entries

44 entries across 41 versions & 19 rubygems

Version Path
abaci-0.3.0 vendor/bundle/gems/thor-0.19.1/spec/exit_condition_spec.rb
gameboard-3.1.0 vendor/bundle/ruby/2.3.0/gems/thor-0.19.1/spec/exit_condition_spec.rb
gameboard-3.0.0 vendor/bundle/ruby/2.3.0/gems/thor-0.19.1/spec/exit_condition_spec.rb
cvss-suite-1.0.8 vendor/cache/ruby/2.2.0/gems/thor-0.19.1/spec/exit_condition_spec.rb
tdiary-5.0.2 vendor/bundle/gems/thor-0.19.1/spec/exit_condition_spec.rb
tdiary-5.0.1 vendor/bundle/gems/thor-0.19.1/spec/exit_condition_spec.rb
cvss-suite-1.0.7 vendor/cache/ruby/2.2.0/gems/thor-0.19.1/spec/exit_condition_spec.rb
ish_lib_manager-0.0.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/thor-0.19.1/spec/exit_condition_spec.rb
cvss-suite-1.0.6 vendor/cache/ruby/2.2.0/gems/thor-0.19.1/spec/exit_condition_spec.rb
cvss-suite-1.0.5 vendor/cache/ruby/2.2.0/gems/thor-0.19.1/spec/exit_condition_spec.rb
cvss-suite-1.0.4 vendor/cache/ruby/2.2.0/gems/thor-0.19.1/spec/exit_condition_spec.rb
cvss-suite-1.0.3 vendor/cache/ruby/2.2.0/gems/thor-0.19.1/spec/exit_condition_spec.rb
cvss-suite-1.0.2 vendor/cache/ruby/2.2.0/gems/thor-0.19.1/spec/exit_condition_spec.rb
cvss-suite-1.0.1 vendor/cache/ruby/2.2.0/gems/thor-0.19.1/spec/exit_condition_spec.rb
cvss-suite-1.0.0 vendor/cache/ruby/2.2.0/gems/thor-0.19.1/spec/exit_condition_spec.rb
honeybadger-2.4.0 vendor/gems/ruby/1.9.1/gems/thor-0.19.1/spec/exit_condition_spec.rb
honeybadger-2.4.0 vendor/gems/ruby/2.2.0/gems/thor-0.19.1/spec/exit_condition_spec.rb
honeybadger-2.4.0 vendor/gems/ruby/2.1.0/gems/thor-0.19.1/spec/exit_condition_spec.rb
angular-rails4-templates-0.4.1 vendor/ruby/2.1.0/gems/thor-0.19.1/spec/exit_condition_spec.rb
vagrant-unbundled-1.8.1.1 vendor/bundle/ruby/2.3.0/gems/thor-0.19.1/spec/exit_condition_spec.rb