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-1.8.4.2 vendor/bundle/ruby/2.3.0/gems/thor-0.18.1/spec/exit_condition_spec.rb
vagrant-unbundled-1.8.4.1 vendor/bundle/ruby/2.3.0/gems/thor-0.18.1/spec/exit_condition_spec.rb
vagrant-cloudstack-1.1.0 vendor/bundle/gems/thor-0.18.1/spec/exit_condition_spec.rb
acquia_toolbelt-2.4.1 lib/vendor/thor/spec/exit_condition_spec.rb
acquia_toolbelt-2.4.0 lib/vendor/thor/spec/exit_condition_spec.rb
acquia_toolbelt-2.3.2 lib/vendor/thor/spec/exit_condition_spec.rb
acquia_toolbelt-2.3.1 lib/vendor/thor/spec/exit_condition_spec.rb
climine-0.0.7 vendor/bundle/ruby/2.1.0/gems/thor-0.18.1/spec/exit_condition_spec.rb
climine-0.0.7 vendor/bundle/ruby/2.0.0/gems/thor-0.18.1/spec/exit_condition_spec.rb
climine-0.0.6 vendor/bundle/ruby/2.0.0/gems/thor-0.18.1/spec/exit_condition_spec.rb
climine-0.0.5 vendor/bundle/ruby/2.0.0/gems/thor-0.18.1/spec/exit_condition_spec.rb
climine-0.0.4 vendor/bundle/ruby/2.0.0/gems/thor-0.18.1/spec/exit_condition_spec.rb
climine-0.0.3 vendor/bundle/ruby/2.0.0/gems/thor-0.18.1/spec/exit_condition_spec.rb
mango-0.8.0 vendor/bundler/ruby/2.1.0/gems/thor-0.18.1/spec/exit_condition_spec.rb
climine-0.0.2 vendor/bundle/ruby/2.0.0/gems/thor-0.18.1/spec/exit_condition_spec.rb
climine-0.0.1 vendor/bundle/ruby/2.0.0/gems/thor-0.18.1/spec/exit_condition_spec.rb
acquia_toolbelt-2.0.1 lib/vendor/thor/spec/exit_condition_spec.rb
acquia_toolbelt-2.0.0 lib/vendor/thor/spec/exit_condition_spec.rb
thor_dleavitt-0.18.1 spec/exit_condition_spec.rb
thor-dleavitt-0.18.1 spec/exit_condition_spec.rb