Permalink
Browse files

Add spec to ensure #transaction returns correct result

  • Loading branch information...
brynary committed Aug 26, 2009
1 parent b5957aa commit b0de8de48eed89afcba37542d50f08b3ef92b0e7
Showing with 7 additions and 0 deletions.
  1. +7 −0 spec/oink_spec.rb
View
@@ -70,6 +70,13 @@
end
end
+ it "returns the value from the transaction block" do
+ result = $stats.transaction do
+ "Foo"
+ end
+ result.should == "Foo"
+ end
+
it "stores additional provided integer values" do
$stats.transaction do
$stats[:custom_field] = 10

0 comments on commit b0de8de

Please sign in to comment.