Sha256: 403aa9357f697683b775f5b3ee8aaf780bbd3b854c5a357d97e84051286edb7f

Contents?: true

Size: 358 Bytes

Versions: 5

Compression:

Stored size: 358 Bytes

Contents

require "active_model/lint"
require "test/unit/assertions"

shared_examples_for 'ActiveModel' do
  include ActiveModel::Lint::Tests
  include Test::Unit::Assertions

  before { @model = subject }

  ActiveModel::Lint::Tests.public_instance_methods.map(&:to_s).grep(/^test/).each do |test|
    example test.gsub("_", " ") do
      send test
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
toystore-0.13.2 spec/support/shared_active_model_lint.rb
toystore-0.13.1 spec/support/shared_active_model_lint.rb
toystore-0.13.0 spec/support/shared_active_model_lint.rb
toystore-0.12.0 spec/support/shared_active_model_lint.rb
toystore-0.11.0 spec/support/shared_active_model_lint.rb