Created
May 12, 2010 18:59
-
-
Save tenderlove/398997 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment