Sha256: a8c9d40ca035ee232083f94e4f27804575fdef549a43b32b0c88357b7b3b3014

Contents?: true

Size: 883 Bytes

Versions: 23

Compression:

Stored size: 883 Bytes

Contents

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

Expectations do

  expect false do
    parent = stub('parent', :child => stub(:valid? => false))
    validation = Validatable::ValidatesAssociated.new stub_everything, :child
    validation.valid?(parent)
  end

  expect true do
    parent = stub('parent', :child => stub(:valid? => true))
    validation = Validatable::ValidatesAssociated.new stub_everything, :child
    validation.valid?(parent)
  end

  expect false do
    parent = stub('parent', :children => [stub(:valid? => false)])
    validation = Validatable::ValidatesAssociated.new stub_everything, :children
    validation.valid?(parent)
  end

  expect true do
    parent = stub('parent', :children => [stub(:valid? => true)])
    validation = Validatable::ValidatesAssociated.new stub_everything, :children
    validation.valid?(parent)
  end

end

Version data entries

23 entries across 23 versions & 6 rubygems

Version Path
hashrocket-validatable-1.7.4 test/unit/test_validates_associated.rb
lgustafson-validatable-1.8.7 test/unit/test_validates_associated.rb
lgustafson-validatable-1.8.6 test/unit/test_validates_associated.rb
erotte-validatable-1.8.5 test/unit/test_validates_associated.rb
mattmatt-validatable-1.8.4 test/unit/test_validates_associated.rb
mattmatt-validatable-1.8.3 test/unit/test_validates_associated.rb
jnunemaker-validatable-1.8.4 test/unit/test_validates_associated.rb
jnunemaker-validatable-1.8.3 test/unit/test_validates_associated.rb
jnunemaker-validatable-1.8.2 test/unit/test_validates_associated.rb
jnunemaker-validatable-1.1.10 test/unit/test_validates_associated.rb
jnunemaker-validatable-1.1.9 test/unit/test_validates_associated.rb
durran-validatable-2.0.1 test/unit/test_validates_associated.rb
durran-validatable-2.0.0 test/unit/test_validates_associated.rb
durran-validatable-1.8.4 test/unit/test_validates_associated.rb
durran-validatable-1.8.3 test/unit/test_validates_associated.rb
jnunemaker-validatable-1.8.1 test/unit/test_validates_associated.rb
durran-validatable-1.8.2 test/unit/test_validates_associated.rb
durran-validatable-1.8.1 test/unit/test_validates_associated.rb
durran-validatable-1.8.0 test/unit/test_validates_associated.rb
durran-validatable-1.7.5 test/unit/test_validates_associated.rb