Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Spec Complex::I

  • Loading branch information...
commit e9de614497ab9dfcd493df948770ee5b6f2fe8ef 1 parent cd6d823
@jfirebaugh jfirebaugh authored brixen committed
View
7 core/complex/constants_spec.rb
@@ -0,0 +1,7 @@
+require File.expand_path('../../../shared/complex/constants', __FILE__)
+
+ruby_version_is "1.9" do
+ describe "Complex::I" do
+ it_behaves_like :complex_I, :I
+ end
+end
View
9 library/complex/constants_spec.rb
@@ -0,0 +1,9 @@
+require File.expand_path('../../../shared/complex/constants', __FILE__)
+
+ruby_version_is ""..."1.9" do
+ require 'complex'
+
+ describe "Complex::I" do
+ it_behaves_like :complex_I, :I
+ end
+end
View
7 shared/complex/constants.rb
@@ -0,0 +1,7 @@
+require File.expand_path('../../../spec_helper', __FILE__)
+
+describe :complex_I, :shared => true do
+ it "is Complex(0, 1)" do
+ Complex::I.should eql(Complex(0, 1))
+ end
+end
Please sign in to comment.
Something went wrong with that request. Please try again.