summaryrefslogtreecommitdiff
path: root/spec/ruby/core/complex/to_c_spec.rb
blob: 5ce01d9d4e9f534d464af71c1a3501373bfca334 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
require_relative '../../spec_helper'

describe "Complex#to_c" do
  it "returns self" do
    value = Complex(1, 5)
    value.to_c.should equal(value)
  end

  it 'returns the same value' do
    Complex(1, 5).to_c.should == Complex(1, 5)
  end
end