Skip to content
Browse files

Add spec for Virtus::Coercion::Decimal.to_decimal

  • Loading branch information...
1 parent 22bdc71 commit 6327b6ed4a20e9356ecbdfac5f8b029f4a712b8b @solnic committed Mar 19, 2012
Showing with 6 additions and 1 deletion.
  1. +6 −1 spec/unit/virtus/coercion/decimal/class_methods/to_decimal_spec.rb
7 spec/unit/virtus/coercion/decimal/class_methods/to_decimal_spec.rb
@@ -1,5 +1,10 @@
require 'spec_helper'
describe Virtus::Coercion::Decimal, '.to_decimal' do
- it 'should have spec'
+ subject { described_class.to_decimal(value) }
+ let(:value) { mock('value') }
+ it { should be(value) }

1 comment on commit 6327b6e

dkubb commented on 6327b6e Mar 19, 2012

What about changing the spec so that the value is actually a BigDecimal?

I know that technically this spec will pass, but it doesn't seem like it's actually testing anything. Without knowing about the internals, the thing I would care most about as a user is that a BigDecimal passes through untouched.

Please sign in to comment.
Something went wrong with that request. Please try again.