Skip to content
This repository has been archived by the owner on Jan 24, 2024. It is now read-only.

Commit

Permalink
Merge pull request Growstuff#744 from andrba/currency_spec_refactoring
Browse files Browse the repository at this point in the history
Growstuff#558 Currency refactoring in specs.
  • Loading branch information
pozorvlak committed Jun 26, 2015
2 parents 5bb04dc + 44b260b commit daa8717
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
describe ApplicationHelper do
it "formats prices" do
price_in_dollars(999).should eq '9.99'
price_with_currency(999).should eq '9.99 AUD'
price_with_currency(999).should eq '9.99 %s' % Growstuff::Application.config.currency
end

it "parses dates" do
Expand Down
6 changes: 3 additions & 3 deletions spec/views/shop/index_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@
assert_select("h2", :text => @product1.name)
end

it 'shows prices in AUD' do
rendered.should have_content '9.99 AUD'
it 'shows prices in configured currency' do
rendered.should have_content '9.99 %s' % Growstuff::Application.config.currency
end

it 'should contain an exchange rate link' do
Expand All @@ -45,7 +45,7 @@
end

it 'shows recommended price for products that have it' do
rendered.should have_content '12.00 AUD'
rendered.should have_content '12.00 %s' % Growstuff::Application.config.currency
end

it 'should contain an exchange rate link for recommended price' do
Expand Down

0 comments on commit daa8717

Please sign in to comment.