summaryrefslogtreecommitdiff
path: root/spec/ruby/core/complex/imaginary_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/core/complex/imaginary_spec.rb')
-rw-r--r--spec/ruby/core/complex/imaginary_spec.rb9
1 files changed, 7 insertions, 2 deletions
diff --git a/spec/ruby/core/complex/imaginary_spec.rb b/spec/ruby/core/complex/imaginary_spec.rb
index ecae19283b..ac9284e934 100644
--- a/spec/ruby/core/complex/imaginary_spec.rb
+++ b/spec/ruby/core/complex/imaginary_spec.rb
@@ -1,5 +1,10 @@
-require File.expand_path('../../../shared/complex/image', __FILE__)
+require_relative '../../spec_helper'
describe "Complex#imaginary" do
- it_behaves_like :complex_image, :imaginary
+ it "returns the imaginary part of self" do
+ Complex(1, 0).imaginary.should == 0
+ Complex(2, 1).imaginary.should == 1
+ Complex(6.7, 8.9).imaginary.should == 8.9
+ Complex(1, bignum_value).imaginary.should == bignum_value
+ end
end