spec/spec_helper.rb in amee-data-abstraction-1.0.0 vs spec/spec_helper.rb in amee-data-abstraction-1.1.0

- old
+ new

@@ -174,9 +174,23 @@ with(connection,"/data/#{path}").at_least.once. and_return(mock_dc) return self end + def create_and_get + mock_pi=test.flexmock( + :amounts=>test.flexmock(:find=>{:value=>result}), + :data_item_uid=>dataitemuid, + :uid=>uid + ) + test.flexmock(AMEE::Profile::Item).should_receive(:create). + with(catuid,dataitemuid, + {:get_item=>true,:name=>:sometimestamp}.merge(params)). + at_least.once. + and_return(mock_pi) + return self + end + def create test.flexmock(AMEE::Profile::Item).should_receive(:create). with(catuid,dataitemuid, {:get_item=>false,:name=>:sometimestamp}.merge(params)). at_least.once. \ No newline at end of file