Sha256: 194d76284e3d63e2cc559119367e92c23e5cb53b3b08dc3c3a64c207a23ebbc3

Contents?: true

Size: 804 Bytes

Versions: 1

Compression:

Stored size: 804 Bytes

Contents

require 'spec/test/unit'

# This must be kept in sync with active_model/lint tests
# at least for as long as
#
#   http://rspec.lighthouseapp.com/projects/5645/tickets/900
#
# isn't resolved in some way (probably with rspec2)

share_examples_for 'an active_model compliant object' do

  include ActiveModel::Lint::Tests

  it 'must implement the #to_key interface' do
    test_to_key
  end

  it 'must implement the #to_param interface' do
    test_to_param
  end

  it 'must implement the #valid? interface' do
    test_valid?
  end

  it 'must implement the #persisted? interface' do
    test_persisted?
  end

  it 'must implement the #model_naming interface' do
    test_model_naming
  end

  it 'must implement the #errors interface' do
    test_errors_aref
    test_errors_full_messages
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
dm-active_model-0.4.0 spec/amo_compliance_spec.rb