Skip to content

Commit

Permalink
show exe output on fail
Browse files Browse the repository at this point in the history
  • Loading branch information
wr0ngway committed Aug 2, 2018
1 parent 5ff99ff commit e2fecf4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions spec/cli_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,8 @@ def argv(arg)
it "runs the cli" do
@c.file('config/atmos.yml')
exe = File.expand_path('../../exe/atmos', __FILE__)
output = `bundle exec #{exe} version`
expect($?.exitstatus).to be(0)
output = `bundle exec #{exe} version 2>&1`
expect($?.exitstatus).to be(0), "exe failed: #{output}"
expect(output).to include(Atmos::VERSION)
expect(File.exist?('atmos.log')).to be true
expect(File.read('atmos.log')).to include(Atmos::VERSION)
Expand Down
2 changes: 1 addition & 1 deletion spec/integration/initial_setup_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def atmos(*args, output_on_fail: true, allow_fail: false, stdin_data: nil)
output, status = Open3.capture2e("bundle", "exec", exe, *args, stdin_data: stdin_data)
puts output if output_on_fail && status.exitstatus != 0
if ! allow_fail
expect(status.exitstatus).to be(0), "atmos #{args.join(' ')} failed"
expect(status.exitstatus).to be(0), "atmos #{args.join(' ')} failed: #{output}"
end
return output
end
Expand Down

0 comments on commit e2fecf4

Please sign in to comment.