Permalink
Browse files

Add spec for Virtus::Coercion::Time.to_integer

  • Loading branch information...
1 parent 73e6823 commit 9fe3f5ea917781df87b0eb821d1bf5f04f4f3ace @solnic committed Mar 19, 2012
Showing with 7 additions and 1 deletion.
  1. +7 −1 spec/unit/virtus/coercion/time/class_methods/to_integer_spec.rb
@@ -1,5 +1,11 @@
require 'spec_helper'
describe Virtus::Coercion::Time, '.to_integer' do
- it 'should have spec'
+ subject { described_class.to_integer(value) }
+
+ let(:time) { Time.now }
+ let(:value) { time }
+
+ it { should eql(time.to_i) }
end
+

0 comments on commit 9fe3f5e

Please sign in to comment.