Class: ATMUpdateTestFormatter

Inherits:
ATMFormatter::BaseFormatter show all
Defined in:
lib/atm_update_test_formatter.rb

Constant Summary

Constants inherited from ATMFormatter::BaseFormatter

ATMFormatter::BaseFormatter::DEFAULT_OPTIONS, ATMFormatter::BaseFormatter::NOTIFICATIONS

Instance Method Summary collapse

Methods inherited from ATMFormatter::BaseFormatter

#start

Instance Method Details

#example_started(notification) ⇒ Object



6
7
8
9
10
11
12
13
14
15
16
# File 'lib/atm_update_test_formatter.rb', line 6

def example_started(notification)
  if (notification.example..key?(:test_id) && notification.example.[:test_id].strip.empty?) || !notification.example..key?(:test_id)
    return
  end

  response = @client.TestCase.update(notification.example.[:test_id], process_example(notification.example))
  if response.code != 200
    puts ATM::TestCaseError.new(response).message
    exit
  end
end