Sha256: 66036ad869fed41ead5fd3742622d8253f37d943ad01ef30a08ded4d7fee7bf0

Contents?: true

Size: 681 Bytes

Versions: 4

Compression:

Stored size: 681 Bytes

Contents

require File.dirname(__FILE__) + '/test_helper'

class EventTest < Test::Unit::TestCase
  context "An event" do
    should "accept its type and source in the constructor" do
      event = Onfire::Event.new(:click, :source)
      
      assert_equal :click,  event.type
      assert_equal :source, event.source
    end
    
    should "be fine without any parameters at all" do
      event = Onfire::Event.new
      
      assert_nil  event.type
      assert_nil  event.source
      assert_nil  event.data
    end
    
    should "stop if needed" do
      event = Onfire::Event.new
      
      assert ! event.stopped?
      event.stop!
      assert event.stopped?
    end
  end
end

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
nilclass-onfire-0.1.3.nc test/event_test.rb
nilclass-onfire-0.1.2.nc test/event_test.rb
nilclass-onfire-0.1.1.nc test/event_test.rb
onfire-0.1.0 test/event_test.rb