Sha256: 357b85645e27b3ae40839224853da9252d2a2b66807543af339faa833db4d716

Contents?: true

Size: 444 Bytes

Versions: 6

Compression:

Stored size: 444 Bytes

Contents

require_relative 'spec_helper'

describe ActiveModel::Form do
  it "can be set but doesn't influence subclasses" do
    class Parent < ActiveModel::Form
      self.model_name = 'the_parent'
    end
    class Child < ActiveModel::Form
      self.model_name = 'the_child'
    end

    ActiveModel::Form.model_name.must_equal 'ActiveModel::Form'
    Parent.model_name.must_equal 'the_parent'
    Child.model_name.must_equal 'the_child'
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
activemodel-form-1.2.0 spec/model_name_spec.rb
activemodel-form-1.1.0 spec/model_name_spec.rb
activemodel-form-1.0.0 spec/model_name_spec.rb
activemodel-form-0.0.3 spec/model_name_spec.rb
activemodel-form-0.0.2 spec/model_name_spec.rb
activemodel-form-0.0.1 spec/model_name_spec.rb