Skip to content

Commit

Permalink
Update spec
Browse files Browse the repository at this point in the history
  • Loading branch information
kholbekj authored Jun 5, 2023
1 parent 73892e2 commit df6525f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions spec/money/formatting_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -750,16 +750,16 @@
end
end

describe ':format to "%u%n" for currency with :symbol_first to true' do
describe ':format to "%u %n" for currency with :symbol_first to true' do
context 'when rules are not passed' do
it "does not insert space between symbol and number" do
expect(Money.new(100_00, 'CHF').format).to eq "CHF100.00"
it "inserts a space between symbol and number" do
expect(Money.new(100_00, 'CHF').format).to eq "CHF 100.00"
end
end

context 'when symbol_position is passed' do
it "inserts currency symbol before the amount when set to :before" do
expect(Money.new(100_00, 'CHF').format(symbol_position: :before)).to eq "CHF100.00"
expect(Money.new(100_00, 'CHF').format(symbol_position: :before)).to eq "CHF 100.00"
end

it "inserts currency symbol after the amount when set to :after" do
Expand Down

0 comments on commit df6525f

Please sign in to comment.