Skip to content

Commit

Permalink
Fix how to show host name in error
Browse files Browse the repository at this point in the history
  • Loading branch information
mizzy committed Aug 17, 2014
1 parent 52252c5 commit 2aca137
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/serverspec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@
module RSpec::Core::Notifications
class FailedExampleNotification < ExampleNotification
def failure_lines
host = ENV['TARGET_HOST'] || Specinfra.configuration.host
@failure_lines ||=
begin
lines = ["On host `#{Specinfra.configuration.host}`"]
lines = ["On host `#{host}`"]
lines << "Failure/Error: #{read_failed_line.strip}"
lines << "#{exception_class_name}:" unless exception_class_name =~ /RSpec/
exception.message.to_s.split("\n").each do |line|
Expand Down

0 comments on commit 2aca137

Please sign in to comment.