Guest User

Untitled

a guest
May 25th, 2018
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. def test_changes
  2. @db.execute("create table foo ( a integer primary key, b text )")
  3. assert_equal 0, @db.changes
  4. @db.execute("insert into foo (b) VALUES ('asdf')")
  5. assert_equal 1, @db.changes
  6. @db.execute("update foo set b = 'hello' where b = 'asdf'")
  7. assert_equal 1, @db.changes
  8. assert_equal [['hello']], @db.execute("select b from foo")
  9. end
Add Comment
Please, Sign In to add comment