Sha256: 22a0a6d24cfecbd5919a975fa4101ab332933e88ba5af44df44f78dff2b98e6c
Contents?: true
Size: 659 Bytes
Versions: 4
Compression:
Stored size: 659 Bytes
Contents
require 'spec_helper' describe "MULTIPLE MODELS TESTS" do before do [Phone, Car].each do |model| model.clear_validators! model.clear_dynamic_attrs! end end it "_dynamic_attrs should be different" do expect(Phone._dynamic_attrs).to eq({}) expect(Car._dynamic_attrs).to eq({}) Phone.define_attrs [{name:{validates:{presence: true}, on: :right}}] Car.define_attrs [{name:{validates:{presence: true}, on: :another}}] expect(Phone._dynamic_attrs).not_to eq({}) expect(Car._dynamic_attrs).not_to eq({}) expect(Phone._dynamic_attrs).not_to eq Car._dynamic_attrs end end
Version data entries
4 entries across 4 versions & 1 rubygems