File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change 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
You can’t perform that action at this time.
0 commit comments