diff options
Diffstat (limited to 'spec/ruby/core/complex/imaginary_spec.rb')
| -rw-r--r-- | spec/ruby/core/complex/imaginary_spec.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/ruby/core/complex/imaginary_spec.rb b/spec/ruby/core/complex/imaginary_spec.rb new file mode 100644 index 0000000000..ac9284e934 --- /dev/null +++ b/spec/ruby/core/complex/imaginary_spec.rb @@ -0,0 +1,10 @@ +require_relative '../../spec_helper' + +describe "Complex#imaginary" do + 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 |
