Sha256: 6321126a21749c6d7c36f17a807a0bbe3847c352d676b51a39f66f56f215715e

Contents?: true

Size: 535 Bytes

Versions: 5

Compression:

Stored size: 535 Bytes

Contents

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

class PersonByDefaultTest < Test::Unit::TestCase
  def setup
    @person = create_person
  end
  
  def test_should_not_have_any_phone_numbers
    assert @person.phone_numbers.empty?
  end
end

class PersonWithPhoneNumbersTest < Test::Unit::TestCase
  def setup
    @person = create_person
    @phone_number = create_phone_number(:phoneable => @person)
  end
  
  def test_should_have_phone_numbers
    assert_equal [@phone_number], @person.phone_numbers
  end
end

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
pluginaweek-has_phone_numbers-0.2.0 test/functional/has_phone_numbers_test.rb
has_phone_numbers-0.2.1 test/functional/has_phone_numbers_test.rb
has_phone_numbers-0.1.0 test/functional/has_phone_numbers_test.rb
has_phone_numbers-0.0.5 test/functional/has_phone_numbers_test.rb
has_phone_numbers-0.2.0 test/functional/has_phone_numbers_test.rb