Sha256: 52fa44d92f7978351ba096fc93dab15bc507050d25bc688f8d7a9703f7ec3ad6

Contents?: true

Size: 274 Bytes

Versions: 3

Compression:

Stored size: 274 Bytes

Contents

# frozen_string_literal: true

require 'rails_helper'

RSpec.describe Article, '.find_by' do
  subject { described_class.create title: 'title' }

  it 'works with normal id' do
    record = described_class.find_by(id: subject.id)

    expect(subject).to eq record
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
idy-0.1.3 spec/lib/idy/extension/find_by_spec.rb
idy-0.1.2 spec/lib/idy/extension/find_by_spec.rb
idy-0.1.1 spec/lib/idy/extension/find_by_spec.rb