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

- old
+ new

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