Skip to content

Commit

Permalink
Add specs for Database#supports_savepoints_in_prepared_transactions?
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremyevans committed May 23, 2012
1 parent 798a349 commit d47df33
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions spec/core/database_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2002,6 +2002,19 @@ def @db.dc; @dc end
end
end

describe "Database#supports_savepoints_in_prepared_transactions?" do
specify "should be false by default" do
Sequel::Database.new.supports_savepoints_in_prepared_transactions?.should == false
end

specify "should be true if both savepoints and prepared transactions are supported" do
db = Sequel::Database.new
db.meta_def(:supports_savepoints?){true}
db.meta_def(:supports_prepared_transactions?){true}
db.supports_savepoints_in_prepared_transactions?.should == true
end
end

describe "Database#supports_prepared_transactions?" do
specify "should be false by default" do
Sequel::Database.new.supports_prepared_transactions?.should == false
Expand Down

0 comments on commit d47df33

Please sign in to comment.