Sha256: ae250a0639c44913e500be267eb8794a5da8db2f0753bbb0d7f30d4cef7715d3

Contents?: true

Size: 428 Bytes

Versions: 10

Compression:

Stored size: 428 Bytes

Contents

require_relative '../test_helper'

class FooTest < ActiveSupport::TestCase

  def test_fixtures_validity
    Foo.all.each do |foo|
      assert foo.valid?, foo.errors.inspect
    end
  end

  def test_validation
    foo = Foo.new
    assert foo.invalid?
    assert_equal [:bar], foo.errors.keys
  end

  def test_creation
    assert_difference 'Foo.count' do
      Foo.create(
        bar: 'test bar',
      )
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
comfortable_mexican_sofa-2.0.9 test/fixtures/generators/scaffold/tests/model.rb
comfortable_mexican_sofa-2.0.8 test/fixtures/generators/scaffold/tests/model.rb
comfortable_mexican_sofa-2.0.7 test/fixtures/generators/scaffold/tests/model.rb
comfortable_mexican_sofa-2.0.6 test/fixtures/generators/scaffold/tests/model.rb
comfortable_mexican_sofa-2.0.5 test/fixtures/generators/scaffold/tests/model.rb
comfortable_mexican_sofa-2.0.4 test/fixtures/generators/scaffold/tests/model.rb
comfortable_mexican_sofa-2.0.3 test/fixtures/generators/scaffold/tests/model.rb
comfortable_mexican_sofa-2.0.2 test/fixtures/generators/scaffold/tests/model.rb
comfortable_mexican_sofa-2.0.1 test/fixtures/generators/scaffold/tests/model.rb
comfortable_mexican_sofa-2.0.0 test/fixtures/generators/scaffold/tests/model.rb