Guest User

Untitled

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