Skip to content
Browse files

Add specs for Virtus::Coercion.primitive

  • Loading branch information...
1 parent a96f18a commit 22bdc713b5893fe76e02db1c5e8fc08060464fca @solnic committed Mar 19, 2012
Showing with 9 additions and 1 deletion.
  1. +9 −1 spec/unit/virtus/coercion/class_methods/primitive_spec.rb
View
10 spec/unit/virtus/coercion/class_methods/primitive_spec.rb
@@ -1,5 +1,13 @@
require 'spec_helper'
describe Virtus::Coercion, '.primitive' do
- it 'should have spec'
+ Virtus::Coercion.descendants.each do |descendant|
+ subject { descendant.primitive }
+
+ let(:primitive) { Object.const_get(descendant.name.split('::').last.to_sym) }
+
+ describe "#{descendant}.primitive" do
+ it { should be(primitive) }
+ end
+ end
end

0 comments on commit 22bdc71

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