Skip to content

Commit

Permalink
Add spec for Virtus::Coercion::Decimal.to_decimal
Browse files Browse the repository at this point in the history
  • Loading branch information
solnic committed Mar 19, 2012
1 parent 22bdc71 commit 6327b6e
Showing 1 changed file with 6 additions and 1 deletion.
@@ -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) }
end

1 comment on commit 6327b6e

@dkubb
Copy link
Collaborator

@dkubb dkubb commented on 6327b6e Mar 19, 2012

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.