Sha256: f0a10c39ca3f28cb70b4eb0d1de2207986ccccfde712bf6691cf8fb537bf820f

Contents?: true

Size: 328 Bytes

Versions: 6

Compression:

Stored size: 328 Bytes

Contents

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

6 entries across 6 versions & 1 rubygems

Version Path
modis-1.4.2 spec/errors_spec.rb
modis-1.4.1-java spec/errors_spec.rb
modis-1.4.1 spec/errors_spec.rb
modis-1.4.0 spec/errors_spec.rb
modis-1.3.0 spec/errors_spec.rb
modis-1.2.0 spec/errors_spec.rb