diff --git a/spec/unit/active_attr/typecasting_spec.rb b/spec/unit/active_attr/typecasting_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/unit/active_attr/typecasting_spec.rb
+++ b/spec/unit/active_attr/typecasting_spec.rb
@@ -123,12 +123,12 @@ module ActiveAttr
         end
 
         context "from Float::INFINITY" do
-          let(:value) { Float::INFINITY }
+          let(:value) { 1.0 / 0.0 }
           it { should be_nil }
         end
 
         context "from Float::NAN" do
-          let(:value) { Float::NAN }
+          let(:value) { 0.0 / 0.0 }
           it { should be_nil }
         end
       end
No Float::INFINITY or FLOAT::NAN in <I>x, use computations resulting in those values for #5