tutorials/heat_watcher/heat_watcher.rb in bond-spy-0.1.0 vs tutorials/heat_watcher/heat_watcher.rb in bond-spy-0.2.0

- old
+ new

@@ -65,21 +65,21 @@ sleep(interval) end end # Spy this function, want to spy the result - bond.spy_point(spy_result: true) + bond.spy_point(spy_result: true, mock_only: true) # Read the temperature from a sensor def get_temperature resp_code, temp_data = make_request('http://system.server.com/temperature') raise 'Error while retrieving temperature!' unless resp_code == 200 match = /<temperature>([0-9.]+)<\/temperature>/.match(temp_data) raise "Error while parsing temperature from: #{temp_data}" if match.nil? match[1].to_f end - bond.spy_point + bond.spy_point(mock_only: true) # Read the current time def get_current_time Time.now.to_i end