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
angular-rails4-templates-0.4.0 vendor/ruby/2.1.0/gems/thor-0.19.1/spec/exit_condition_spec.rb
tdiary-4.2.1 vendor/bundle/ruby/2.3.0/gems/thor-0.19.1/spec/exit_condition_spec.rb
tdiary-4.2.1 vendor/bundle/ruby/2.2.0/gems/thor-0.19.1/spec/exit_condition_spec.rb
angular-rails4-templates-0.3.0 vendor/ruby/2.1.0/gems/thor-0.19.1/spec/exit_condition_spec.rb
suzuko-0.1.8 vendor/bundle/ruby/2.0.0/gems/thor-0.19.1/spec/exit_condition_spec.rb
suzuko-0.1.7 vendor/bundle/ruby/2.0.0/gems/thor-0.19.1/spec/exit_condition_spec.rb
mastermind_adeybee-0.1.4 vendor/bundle/ruby/2.2.0/gems/thor-0.19.1/spec/exit_condition_spec.rb
sc_core-0.0.7 test/dummy/vendor/bundle/ruby/2.2.0/gems/thor-0.19.1/spec/exit_condition_spec.rb
mastermind_adeybee-0.1.3 vendor/bundle/ruby/2.2.0/gems/thor-0.19.1/spec/exit_condition_spec.rb
mastermind_adeybee-0.1.2 vendor/bundle/ruby/2.2.0/gems/thor-0.19.1/spec/exit_condition_spec.rb
mastermind_adeybee-0.1.1 vendor/bundle/ruby/2.2.0/gems/thor-0.19.1/spec/exit_condition_spec.rb
vagrant-cloudstack-1.2.0 vendor/bundle/gems/thor-0.19.1/spec/exit_condition_spec.rb
geminfo-0.1.0 path/gems/thor-0.19.1/spec/exit_condition_spec.rb
solidus_backend-1.0.0.pre3 vendor/bundle/gems/thor-0.19.1/spec/exit_condition_spec.rb
solidus_backend-1.0.0.pre2 vendor/bundle/gems/thor-0.19.1/spec/exit_condition_spec.rb
solidus_backend-1.0.0.pre vendor/bundle/gems/thor-0.19.1/spec/exit_condition_spec.rb
vagrant-cloudstack-1.1.0 vendor/bundle/gems/thor-0.19.1/spec/exit_condition_spec.rb
shoppe-paypal-1.1.0 vendor/bundle/ruby/2.1.0/gems/thor-0.19.1/spec/exit_condition_spec.rb
groovenauts-thor-0.19.1.1 spec/exit_condition_spec.rb
nanumfont-rails-0.1 vendor/bundle/ruby/2.1.0/gems/thor-0.19.1/spec/exit_condition_spec.rb