test/user_test.rb in vines-0.1.0 vs test/user_test.rb in vines-0.1.1

- old
+ new

@@ -1,31 +1,33 @@ # encoding: UTF-8 require 'vines' -require 'test/unit' +require 'minitest/autorun' -class UserTest < Test::Unit::TestCase +class UserTest < MiniTest::Unit::TestCase def test_equality alice = Vines::User.new(:jid => 'alice@wonderland.lit') alice2 = Vines::User.new(:jid => 'alice@wonderland.lit') hatter = Vines::User.new(:jid => 'hatter@wonderland.lit') + assert_nil alice <=> 42 + assert alice == alice2 assert alice.eql?(alice2) assert alice.hash == alice2.hash - assert alice != hatter - assert !alice.eql?(hatter) - assert alice.hash != hatter.hash + refute alice == hatter + refute alice.eql?(hatter) + refute alice.hash == hatter.hash end def test_initialize_missing_jid assert_raises(ArgumentError) { Vines::User.new } end def test_initialize_missing_roster user = Vines::User.new(:jid => 'alice@wonderland.lit') - assert_not_nil user.roster + refute_nil user.roster assert_equal 0, user.roster.size end def test_update_from user = Vines::User.new(:jid => 'alice@wonderland.lit', :name => 'Alice', :password => "secr3t")