Skip to content

Commit 80eb00c

Browse files
committed
Minor spec updates
1 parent cd63ec8 commit 80eb00c

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

spec/money_spec.rb

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@
135135
context 'initializing with .from_dollars' do
136136
subject(:money) { Money.from_dollars(initializing_value) }
137137

138-
it "is a deprecated .from_amount" do
138+
it "is a deprecated synonym of .from_amount" do
139139
allow(Money).to receive(:warn)
140140
expect(money.amount).to eq initializing_value
141141
expect(Money).to have_received(:warn).with(/DEPRECATION/)
@@ -652,9 +652,13 @@ def expectation.fractional
652652
end
653653

654654
context "when the currency has no symbol" do
655-
it "returns a generic currency symbol" do
656-
currency = Money::Currency.new("EUR")
655+
let(:currency) { Money::Currency.new("EUR") }
656+
657+
before do
657658
expect(currency).to receive(:symbol).and_return(nil)
659+
end
660+
661+
it "returns a generic currency symbol" do
658662
expect(Money.new(0, currency).symbol).to eq "¤"
659663
end
660664
end

0 commit comments

Comments
 (0)