Sha256: 6ef6414ae36481916c24ad53d2a7f31ea7ad31d7a05a6e85b00fe30b3e7d137f

Contents?: true

Size: 427 Bytes

Versions: 15

Compression:

Stored size: 427 Bytes

Contents

shared_examples_for "An ActiveModel" do
  def assert(test, *args)
    expect(test).to eq(true)
  end

  def assert_kind_of(klass, inspected_object)
    expect(inspected_object).to be_kind_of(klass)
  end
  include ActiveModel::Lint::Tests

  ActiveModel::Lint::Tests.public_instance_methods.map{|m| m.to_s}.grep(/^test/).each do |m|
    example m.gsub('_',' ') do
      send m
    end
  end

  def model
    subject
  end

end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
active-fedora-8.1.0 spec/support/an_active_model.rb
active-fedora-8.0.1 spec/support/an_active_model.rb
active-fedora-8.0.0 spec/support/an_active_model.rb
active-fedora-8.0.0.rc3 spec/support/an_active_model.rb
active-fedora-8.0.0.rc2 spec/support/an_active_model.rb
active-fedora-8.0.0.rc1 spec/support/an_active_model.rb
active-fedora-7.1.2 spec/support/an_active_model.rb
active-fedora-7.1.1 spec/support/an_active_model.rb
active-fedora-7.1.0 spec/support/an_active_model.rb
active-fedora-7.0.4 spec/support/an_active_model.rb
active-fedora-7.0.3 spec/support/an_active_model.rb
active-fedora-7.0.2 spec/support/an_active_model.rb
active-fedora-7.0.1 spec/support/an_active_model.rb
active-fedora-7.0.0 spec/support/an_active_model.rb
active-fedora-7.0.0.rc3 spec/support/an_active_model.rb