Displaying 2 results from an estimated 2 matches for "assert_instance_of".
2016 Feb 15
1
[PATCH] Start adding return values tests for bindings
...t;, "2", "3", "4"], g.internal_test_rstringlist("5")
+
+ assert_raises(Guestfs::Error) {
+ g.internal_test_rstringlisterr()
+ }
+ end
+
+ def test_rstruct
+ g = Guestfs::Guestfs.new()
+
+ s = g.internal_test_rstruct("unused")
+ assert_instance_of Hash, s
+ assert_equal "pv0", s["pv_name"]
+
+ assert_raises(Guestfs::Error) {
+ g.internal_test_rstructerr()
+ }
+ end
+
+ def test_rstructlist
+ g = Guestfs::Guestfs.new()
+
+ assert_equal [], g.internal_test_rstructlist("0")
+ l = g.internal...
2006 Feb 22
3
Unit test failure - nil object?
I''m following instructions in the Agile book, page 146 for testing an
object update to the database. Here''s my code:
def test_update
assert_equal "jack@smiths.com", @user.email
@user.email = "jack@smiths.org"
assert @user.save, @user.errors.full_messages.join("; ")
@user.reload
assert_equal @user.email,