Sha256: 8e2f77353ee8acff51e6c7113fe9ed5a9c0f885d83c415546f69059f52aa8816

Contents?: true

Size: 433 Bytes

Versions: 77

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
        raise Errno::EPIPE
      end
    end

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

Version data entries

77 entries across 69 versions & 15 rubygems

Version Path
vagrant-unbundled-2.2.3.0 vendor/bundle/ruby/2.5.0/gems/thor-0.18.1/spec/exit_condition_spec.rb
vagrant-unbundled-2.2.2.0 vendor/bundle/ruby/2.5.0/gems/thor-0.18.1/spec/exit_condition_spec.rb
vagrant-unbundled-2.2.0.0 vendor/bundle/ruby/2.5.0/gems/thor-0.18.1/spec/exit_condition_spec.rb
vagrant-unbundled-2.1.4.0 vendor/bundle/ruby/2.5.0/gems/thor-0.18.1/spec/exit_condition_spec.rb
vagrant-unbundled-2.1.2.0 vendor/bundle/ruby/2.3.0/gems/thor-0.18.1/spec/exit_condition_spec.rb
vagrant-unbundled-2.1.1.0 vendor/bundle/ruby/2.5.0/gems/thor-0.18.1/spec/exit_condition_spec.rb
vagrant-unbundled-2.0.4.0 vendor/bundle/ruby/2.5.0/gems/thor-0.18.1/spec/exit_condition_spec.rb
tdiary-5.0.8 vendor/bundle/ruby/2.5.0/gems/thor-0.18.1/spec/exit_condition_spec.rb
tdiary-5.0.8 vendor/bundle/gems/thor-0.18.1/spec/exit_condition_spec.rb
vagrant-unbundled-2.0.3.0 vendor/bundle/ruby/2.5.0/gems/thor-0.18.1/spec/exit_condition_spec.rb
vagrant-unbundled-2.0.2.0 vendor/bundle/ruby/2.4.0/gems/thor-0.18.1/spec/exit_condition_spec.rb
vagrant-unbundled-2.0.2.0 vendor/bundle/ruby/2.5.0/gems/thor-0.18.1/spec/exit_condition_spec.rb
vagrant-unbundled-2.0.1.0 vendor/bundle/ruby/2.4.0/gems/thor-0.18.1/spec/exit_condition_spec.rb
vagrant-unbundled-2.0.0.1 vendor/bundle/ruby/2.4.0/gems/thor-0.18.1/spec/exit_condition_spec.rb
vagrant-unbundled-1.9.8.1 vendor/bundle/ruby/2.4.0/gems/thor-0.18.1/spec/exit_condition_spec.rb
vagrant-unbundled-1.9.7.1 vendor/bundle/ruby/2.4.0/gems/thor-0.18.1/spec/exit_condition_spec.rb
vagrant-unbundled-1.9.5.1 vendor/bundle/ruby/2.4.0/gems/thor-0.18.1/spec/exit_condition_spec.rb
vagrant-unbundled-1.9.1.1 vendor/bundle/ruby/2.4.0/gems/thor-0.18.1/spec/exit_condition_spec.rb
vagrant-unbundled-1.8.5.2 vendor/bundle/ruby/2.3.0/gems/thor-0.18.1/spec/exit_condition_spec.rb
vagrant-unbundled-1.8.5.1 vendor/bundle/ruby/2.3.0/gems/thor-0.18.1/spec/exit_condition_spec.rb