Sha256: a54a73c6a3c2c544c5aa5a95797ae5fc6621a88c186f9aa317e88ffaa86fa12a

Contents?: true

Size: 585 Bytes

Versions: 57

Compression:

Stored size: 585 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')
    # Kernel.expects(:puts).with('foo')
    no_stdout do
      assert !Behavior.allocate.bypass.complain('foo')
    end
  end
end

Version data entries

57 entries across 57 versions & 20 rubygems

Version Path
dguettler-god-0.7.13.2 test/test_behavior.rb
dguettler-god-0.7.13.3 test/test_behavior.rb
dosire-god-0.7.10 test/test_behavior.rb
dosire-god-0.7.12 test/test_behavior.rb
dosire-god-0.7.9 test/test_behavior.rb
dunedain289-god-0.7.12.1 test/test_behavior.rb
dustin-god-0.7.7.1 test/test_behavior.rb
eric-god-0.7.10 test/test_behavior.rb
eric-god-0.7.11 test/test_behavior.rb
eric-god-0.7.12 test/test_behavior.rb
eric-god-0.7.14 test/test_behavior.rb
eric-god-0.7.7 test/test_behavior.rb
fotonauts-god-0.7.10 test/test_behavior.rb
fotonauts-god-0.7.12 test/test_behavior.rb
gohanlonllc-god-0.7.9 test/test_behavior.rb
gordoncww-god-0.7.11.1 test/test_behavior.rb
jreynolds-god-0.7.13 test/test_behavior.rb
jwilkins-god-0.7.9 test/test_behavior.rb
mathieuravaux-god-0.7.11 test/test_behavior.rb
mojombo-god-0.7.10 test/test_behavior.rb