Sha256: 3b095c79d7de4ce5170fd532332c7b790e4ee3dbe5ae4799e4893046e5122425

Contents?: true

Size: 444 Bytes

Versions: 6

Compression:

Stored size: 444 Bytes

Contents

require 'test_helper'

class PersonTest < ActiveSupport::TestCase
  test "person without name is invalid" do
    person = Person.new
    assert !person.valid?
  end
  
  test "person has no idea about a city" do
    person = Person.new
    assert_raise(NoMethodError) do
      person.city_id = 42
    end
  end
  
  test "wagon models are not loaded in main application tests" do
    assert_raise(NameError) do
      City.new
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
wagons-0.2.2 test/dummy/test/models/person_test.rb
wagons-0.2.1 test/dummy/test/models/person_test.rb
wagons-0.2.0 test/dummy/test/unit/person_test.rb
wagons-0.1.1 test/dummy/test/unit/person_test.rb
wagons-0.1.0 test/dummy/test/unit/person_test.rb
wagons-0.0.9 test/dummy/test/unit/person_test.rb