Sha256: 7d857217c0deef226ddf6c820c6266ac1a43d4f5737b800199c51c4ad9b7a04f

Contents?: true

Size: 532 Bytes

Versions: 15

Compression:

Stored size: 532 Bytes

Contents

require 'test_helper'

class DataMapperCompatibilityTest < ActiveSupport::TestCase
  def teardown
    User.raise_on_save_failure = false
  end
  
  test 'respects raise_on_save_failure' do
    User.raise_on_save_failure = true
    user = new_user(:email => nil)
    assert user.invalid?
    assert_raise DataMapper::SaveFailureError do
      user.save
    end

    user = new_user
    assert user.valid?
    assert user.save

    User.raise_on_save_failure = false
    user = new_user(:email => nil)
    assert !user.save
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
dm-devise-1.5.0 test/data_mapper/compatibility_test.rb
dm-devise-1.5.0.beta test/data_mapper/compatibility_test.rb
dm-devise-1.4.0 test/data_mapper/compatibility_test.rb
dm-devise-1.3.1 test/data_mapper/compatibility_test.rb
dm-devise-1.3.0 test/data_mapper/compatibility_test.rb
dm-devise-1.2.0 test/data_mapper/compatibility_test.rb
dm-devise-1.2.0.rc test/data_mapper/compatibility_test.rb
dm-devise-1.1.8 test/data_mapper/compatibility_test.rb
dm-devise-1.2.0.beta test/data_mapper/compatibility_test.rb
dm-devise-1.1.6 test/data_mapper/compatibility_test.rb
dm-devise-1.1.5 test/data_mapper/compatibility_test.rb
dm-devise-1.1.4 test/data_mapper/compatibility_test.rb
dm-devise-1.1.3 test/data_mapper/compatibility_test.rb
dm-devise-1.1.2 test/data_mapper/compatibility_test.rb
dm-devise-1.1.1 test/data_mapper/compatibility_test.rb