Skip to content

Commit

Permalink
Fix calculation_service_helper test
Browse files Browse the repository at this point in the history
  • Loading branch information
olexandervanzuriak committed Nov 27, 2024
1 parent 6e9fd0d commit 2a5b0c2
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions spec/helpers/calculators/calculation_service_helper_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,14 @@

before do
allow_any_instance_of(ApplicationHelper).to receive(:current_locale?).with(:en).and_return(locale_en)
I18n.locale = locale_en ? :en : :uk
end

describe "#perform" do
subject { described_class.new(calculator, inputs).perform }
subject do
I18n.with_locale(locale_en ? :en : :uk) do
described_class.new(calculator, inputs).perform
end
end

context "when locale is English" do
let(:locale_en) { true }
Expand Down

0 comments on commit 2a5b0c2

Please sign in to comment.