Skip to content

Commit

Permalink
some cleanup
Browse files Browse the repository at this point in the history
remove method_missing and rename done method
  • Loading branch information
Aliaksandr Trush committed Jan 4, 2018
1 parent 333beb4 commit b7f0c77
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 2 additions & 2 deletions lib/report_portal/cucumber/formatter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def initialize(config)
@queue.push([event_name, event, ReportPortal.now])
end
end
config.on_event :test_run_finished, &method(:done)
config.on_event :test_run_finished, &method(:on_test_run_finished)
end

def puts(message)
Expand All @@ -57,7 +57,7 @@ def embed(*args)
@queue.push([:embed, *args, ReportPortal.now])
end

def done(_event)
def on_test_run_finished(_event)
@queue.push([:done, ReportPortal.now])
sleep 0.03 while !@queue.empty? || @queue.num_waiting == 0 # TODO: how to interrupt launch if the user aborted execution
@thread.kill
Expand Down
4 changes: 0 additions & 4 deletions lib/report_portal/cucumber/report.rb
Original file line number Diff line number Diff line change
Expand Up @@ -150,10 +150,6 @@ def embed(src, mime_type, label, desired_time = ReportPortal.now)
ReportPortal.send_file(:info, src, label, time_to_send(desired_time),mime_type)
end

def method_missing(**args)
puts "Method missing #{args.inspect}"
end

private

# Report Portal sorts logs by time. However, several logs might have the same time.
Expand Down

0 comments on commit b7f0c77

Please sign in to comment.