spec/lib/idy/extension/findy_spec.rb in idy-0.1.3 vs spec/lib/idy/extension/findy_spec.rb in idy-1.0.0

- old
+ new

@@ -1,20 +1,20 @@ # frozen_string_literal: true require 'rails_helper' -RSpec.describe '#findy' do +RSpec.describe Article, '#findy' do context 'when a hash is given' do - context 'and record is found' do + context 'when record is found' do let!(:record) { Article.create id: 1 } let!(:hash) { 'My' } it 'finds the record' do expect(Article.findy(hash)).to eq record end end - context 'and record is not found' do + context 'when record is not found' do let!(:hash) { 'My' } it 'returns nil' do expect(Article.findy(hash)).to be_nil end