spec/bond_spec.rb in bond-spy-0.1.0 vs spec/bond_spec.rb in bond-spy-0.2.0

- old
+ new

@@ -144,9 +144,25 @@ bond.deploy_agent('my_point', do: lambda { |_| bond.spy('internal_doer') }, result: lambda { |_| bond.spy('internal_result'); 'mocked' }) bond.spy(result: bond.spy('my_point')) end + it 'should skip saving observations when specified' do + bond.spy('skipped_point', skip_save_observation = true, key: 'value') + + bond.deploy_agent('skipped_point', result: 'Mock Value') + ret = bond.spy('skipped_point', skip = true, key: 'value') + bond.spy('skipped_return_value', val: ret) + + bond.deploy_agent('normal_point', skip_save_observation: false, result: 'Mock Value') + ret = bond.spy('normal_point', skip_save_observation = true, key: 'value') + bond.spy('not_skipped_return_value', val: ret) + + bond.deploy_agent('skipped_point', skip_save_observation: true, result: 'Mock Value') + ret = bond.spy('skipped_point', key: 'value') + bond.spy('skipped_return_value', val: ret) + end + end # TODO # overriding settings using Bond#settings # some different start_test parameters \ No newline at end of file