Sha256: 2de426d5acdf2b0fc0ebfc42def5d366f8ccc0f7c43b94bc9b6049bacba239f3

Contents?: true

Size: 518 Bytes

Versions: 13

Compression:

Stored size: 518 Bytes

Contents

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

class TestBehavior < Test::Unit::TestCase
  def test_generate_should_return_an_object_corresponding_to_the_given_type
    assert_equal Behaviors::FakeBehavior, Behavior.generate(:fake_behavior, nil).class
  end
  
  def test_generate_should_raise_on_invalid_type
    assert_raise NoSuchBehaviorError do
      Behavior.generate(:foo, nil)
    end
  end
  
  def test_complain
    Syslog.expects(:err).with('foo')
    assert !Behavior.allocate.bypass.complain('foo')
  end
end

Version data entries

13 entries across 13 versions & 3 rubygems

Version Path
mojombo-god-0.7.20 test/test_behavior.rb
olgen-god-0.9.2 test/test_behavior.rb
olgen-god-0.9.1 test/test_behavior.rb
olgen-god-0.9.0 test/test_behavior.rb
god-0.8.0 test/test_behavior.rb
olgen-god-0.8.2 test/test_behavior.rb
olgen-god-0.8.1 test/test_behavior.rb
olgen-god-0.8.0 test/test_behavior.rb
god-0.7.22 test/test_behavior.rb
god-0.7.21 test/test_behavior.rb
god-0.7.20 test/test_behavior.rb
god-0.7.19 test/test_behavior.rb
god-0.7.18 test/test_behavior.rb