Sha256: d7a3e654a9f4c991f7c1cbd3d36707e1c1fe419f43560713c845d5044836c24b

Contents?: true

Size: 512 Bytes

Versions: 18

Compression:

Stored size: 512 Bytes

Contents

# frozen_string_literal: true

require 'spec_helper'

describe Sinclair::Comparable do
  describe '#yard' do
    describe '.comparable_by?' do
      let(:model_class) do
        Class.new(SampleModel) do
          include Sinclair::Comparable

          comparable_by :name
        end
      end

      it 'regular usage' do
        model1 = model_class.new(name: 'jack', age: 21)
        model2 = model_class.new(name: 'jack', age: 23)

        expect(model1 == model2).to be_truthy
      end
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
sinclair-2.1.1 spec/integration/yard/sinclair/comparable_spec.rb
sinclair-2.1.0 spec/integration/yard/sinclair/comparable_spec.rb
sinclair-2.0.1 spec/integration/yard/sinclair/comparable_spec.rb
sinclair-2.0.0 spec/integration/yard/sinclair/comparable_spec.rb
sinclair-1.16.3 spec/integration/yard/sinclair/comparable_spec.rb
sinclair-1.16.2 spec/integration/yard/sinclair/comparable_spec.rb
sinclair-1.16.1 spec/integration/yard/sinclair/comparable_spec.rb
sinclair-1.16.0 spec/integration/yard/sinclair/comparable_spec.rb
sinclair-1.15.0 spec/integration/yard/sinclair/comparable_spec.rb
sinclair-1.14.2 spec/integration/yard/sinclair/comparable_spec.rb
sinclair-1.14.1 spec/integration/yard/sinclair/comparable_spec.rb
sinclair-1.14.0 spec/integration/yard/sinclair/comparable_spec.rb
sinclair-1.13.0 spec/integration/yard/sinclair/comparable_spec.rb
sinclair-1.12.1 spec/integration/yard/sinclair/comparable_spec.rb
sinclair-1.12.0 spec/integration/yard/sinclair/comparable_spec.rb
sinclair-1.11.0 spec/integration/yard/sinclair/comparable_spec.rb
sinclair-1.10.0 spec/integration/yard/sinclair/comparable_spec.rb
sinclair-1.9.0 spec/integration/yard/sinclair/comparable_spec.rb