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 text )")
- assert_equal 0, @db.changes
- @db.execute("insert into foo (b) VALUES ('asdf')")
- assert_equal 1, @db.changes
- @db.execute("update foo set b = 'hello' where b = 'asdf'")
- assert_equal 1, @db.changes
- assert_equal [['hello']], @db.execute("select b from foo")
- end
Add Comment
Please, Sign In to add comment