Sha256: c9eab6f779dc2e3f63dba28636923533e779bd4f97b87e0980090db2cde5536d

Contents?: true

Size: 359 Bytes

Versions: 13

Compression:

Stored size: 359 Bytes

Contents

# frozen_string_literal: true

require 'spec_helper'

module ErrorsSpec
  class MockModel
    include Modis::Model

    attribute :name, :string
  end
end

describe Modis::Errors do
  let(:model) { ErrorsSpec::MockModel.new }

  it 'adds errors' do
    model.errors.add(:name, 'is not valid')
    expect(model.errors[:name]).to eq(['is not valid'])
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
modis-4.3.2 spec/errors_spec.rb
modis-4.3.1 spec/errors_spec.rb
modis-4.3.0 spec/errors_spec.rb
modis-4.2.0 spec/errors_spec.rb
modis-4.1.0 spec/errors_spec.rb
modis-4.0.1 spec/errors_spec.rb
modis-4.0.0 spec/errors_spec.rb
modis-3.3.0 spec/errors_spec.rb
modis-3.2.0 spec/errors_spec.rb
modis-3.1.0 spec/errors_spec.rb
modis-3.0.0 spec/errors_spec.rb
modis-2.1.0 spec/errors_spec.rb
modis-2.0.0 spec/errors_spec.rb