require 'test/unit'
require File.expand_path(
  File.join(File.dirname(__FILE__), '../../../../config/environment')
)

include Animal

class Pig   # winka
  acts_as_animal :noise => 'oink'   # przypisanie specyficznego odgosu
end

# klasa testowa
class ActsAsAnimalTest < Test::Unit::TestCase
  def setup
    @p = Pig.new
  end

  def test_makes_proper_noise
    assert_equal @p.noise 'oink!'
  end  

  def test_generic_animal_thing
    assert_equal @p. generic_animal_thing 'poop'
  end  
end

