You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When let(:year) is inside context1, assertion can't find its value (2021).
When we move it to the context2 - it will work.
# frozen_string_literal: true
require 'spec_helper'
describe Cars::ModelService do
subject(:service) { described_class.call(**parameters) }
let(:parameters) { { year: let?(:year, nil) } }
context 'context1' do
let(:year) { '2021' }
context 'context2' do
it 'returns array with one object' do
expect(service.car_list.count).to eq 1
end
end
end
end
The text was updated successfully, but these errors were encountered:
When let(:year) is inside context1, assertion can't find its value (2021).
When we move it to the context2 - it will work.
The text was updated successfully, but these errors were encountered: