Commits

Michael Granger committed 7adf935

Use the yield matcher for transactional methods

Comments (0)

Files changed (2)

spec/thingfish/datastore_spec.rb

 		end
 
 		it "provides a transactional block method" do
-			val = nil
-			store.transaction { val = :yielded }
-			expect( val ).to eq( :yielded )
+			expect {|block| store.transaction(&block) }.to yield_with_no_args
 		end
 
 	end

spec/thingfish/metastore_spec.rb

 		end
 
 		it "provides a transactional block method" do
-			val = nil
-			store.transaction { val = :yielded }
-			expect( val ).to eq( :yielded )
+			expect {|block| store.transaction(&block) }.to yield_with_no_args
 		end
 	end