Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def test_changes
- @db.execute("create table foo ( a integer primary key, b integer )")
- assert_equal 0, @db.changes
- @db.execute("insert into foo (b) VALUES (1)")
- assert_equal 1, @db.changes
- @db.execute("update foo set b = b + ? where b = ?", [2, 1])
- assert_equal 1, @db.changes
- assert_equal [[3]], @db.execute("select b from foo")
- end
Add Comment
Please, Sign In to add comment