Rspec helper returns always true #86

skorfmann opened this Issue Mar 2, 2013 · 2 comments

3 participants

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

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


I'm experiencing the same issue.

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)

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