Sha256: 6e55e0ff4b3a72bdeeb865aed06680ccb1652e3f122c534945dbd0b2bef6d1a7

Contents?: true

Size: 532 Bytes

Versions: 4

Compression:

Stored size: 532 Bytes

Contents

require 'test/test_helper'

class BaseEventHandlerTest < MiniTest::Unit::TestCase

  class Handler
    include Watchr::EventHandler::Base
  end

  def setup
    @handler = Handler.new
  end

  test "api" do
    assert_respond_to @handler, :notify
    assert_respond_to @handler, :listen
    assert_respond_to @handler, :refresh
    assert_includes   @handler.class.ancestors, Observable
  end

  test "notifies observers" do
    @handler.expects(:notify_observers).with('foo/bar', nil)
    @handler.notify('foo/bar', nil)
  end
end

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
social_url_stats-0.0.1 vendor/ruby/1.9.1/gems/watchr-0.7/test/event_handlers/test_base.rb
watchr-0.7 test/event_handlers/test_base.rb
watchr-0.6 test/event_handlers/test_base.rb
watchr-0.5.9 test/event_handlers/test_base.rb