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.19.0 vendor/bundle/ruby/3.0.0/gems/thor-0.18.1/spec/exit_condition_spec.rb
vagrant-unbundled-2.2.18.0 vendor/bundle/ruby/3.0.0/gems/thor-0.18.1/spec/exit_condition_spec.rb
vagrant-unbundled-2.2.16.0 vendor/bundle/ruby/3.0.0/gems/thor-0.18.1/spec/exit_condition_spec.rb
vagrant-unbundled-2.2.16.0 vendor/bundle/ruby/2.7.0/gems/thor-0.18.1/spec/exit_condition_spec.rb
vagrant-unbundled-2.2.14.0 vendor/bundle/ruby/2.7.0/gems/thor-0.18.1/spec/exit_condition_spec.rb
vagrant-unbundled-2.2.10.0 vendor/bundle/ruby/2.7.0/gems/thor-0.18.1/spec/exit_condition_spec.rb
vagrant-unbundled-2.2.9.0 vendor/bundle/ruby/2.7.0/gems/thor-0.18.1/spec/exit_condition_spec.rb
tdiary-5.1.2 vendor/bundle/ruby/2.6.0/gems/thor-0.18.1/spec/exit_condition_spec.rb
vagrant-unbundled-2.2.8.0 vendor/bundle/ruby/2.7.0/gems/thor-0.18.1/spec/exit_condition_spec.rb
tdiary-5.1.1 vendor/bundle/ruby/2.6.0/gems/thor-0.18.1/spec/exit_condition_spec.rb
vagrant-unbundled-2.2.7.0 vendor/bundle/ruby/2.4.0/gems/thor-0.18.1/spec/exit_condition_spec.rb
vagrant-unbundled-2.2.7.0 vendor/bundle/ruby/2.7.0/gems/thor-0.18.1/spec/exit_condition_spec.rb
vagrant-unbundled-2.2.7.0 vendor/bundle/ruby/2.6.0/gems/thor-0.18.1/spec/exit_condition_spec.rb
vagrant-unbundled-2.2.6.2 vendor/bundle/ruby/2.6.0/gems/thor-0.18.1/spec/exit_condition_spec.rb
vagrant-unbundled-2.2.6.1 vendor/bundle/ruby/2.6.0/gems/thor-0.18.1/spec/exit_condition_spec.rb
vagrant-unbundled-2.2.6.0 vendor/bundle/ruby/2.6.0/gems/thor-0.18.1/spec/exit_condition_spec.rb
vagrant-unbundled-2.2.5.0 vendor/bundle/ruby/2.6.0/gems/thor-0.18.1/spec/exit_condition_spec.rb
vagrant-unbundled-2.2.5.0 vendor/bundle/ruby/2.5.0/gems/thor-0.18.1/spec/exit_condition_spec.rb
vagrant-unbundled-2.2.4.0 vendor/bundle/ruby/2.5.0/gems/thor-0.18.1/spec/exit_condition_spec.rb
vagrant-unbundled-2.2.4.0 vendor/bundle/ruby/2.6.0/gems/thor-0.18.1/spec/exit_condition_spec.rb