Rspec helper returns always true #86

Closed
skorfmann opened this Issue Mar 2, 2013 · 2 comments

3 participants

@skorfmann
it 'has price cents' do
  monetize(:price_cents).should be_true
end

This returns always true for me, regardless of an existing call of monetize in the corresponding model and even on other model attributes.

money-rails: 0.8.0
rails: 4.0.0.beta1
rspec: 2.13.0

@brycesenz

I'm experiencing the same issue.

@alup
RubyMoney member

Fixed in master branch.

The examples and the usage was wrong so far.
Sorry for that :S.
The correct way is like:

it 'has price cents' do
  product.should monetize(:price_cents).as(:price).with_currency(:eur)
end

I am going to update the docs, too.
Thanks again for mentioning this problem.

@alup alup closed this Jun 18, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment