Sha256: 44fd8cebd26331adf5b6273ce1347c65bd15fd2279f20b4ff3ec4809e91c041b

Contents?: true

Size: 524 Bytes

Versions: 9

Compression:

Stored size: 524 Bytes

Contents

# encoding: UTF-8

require 'vines'
require 'minitest/autorun'

class ClientSessionTest < MiniTest::Unit::TestCase
  def setup
    @stream = MiniTest::Mock.new
    @stream.expect(:config, nil)
  end

  def test_equality
    one = Vines::Stream::Client::Session.new(@stream)
    two = Vines::Stream::Client::Session.new(@stream)

    assert_nil one <=> 42

    assert one == one
    assert one.eql?(one)
    assert one.hash == one.hash

    refute one == two
    refute one.eql?(two)
    refute one.hash == two.hash
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
vines-0.4.5 test/stream/client/session_test.rb
vines-0.4.4 test/stream/client/session_test.rb
vines-0.4.3 test/stream/client/session_test.rb
vines-0.4.2 test/stream/client/session_test.rb
vines-0.4.1 test/stream/client/session_test.rb
vines-0.4.0 test/stream/client/session_test.rb
vines-0.3.2 test/stream/client/session_test.rb
vines-0.3.1 test/stream/client/session_test.rb
vines-0.3.0 test/stream/client/session_test.rb