diff options
Diffstat (limited to 'spec/ruby/core/rational/numerator_spec.rb')
| -rw-r--r-- | spec/ruby/core/rational/numerator_spec.rb | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/spec/ruby/core/rational/numerator_spec.rb b/spec/ruby/core/rational/numerator_spec.rb index 85b2ed9e86..631bb4703c 100644 --- a/spec/ruby/core/rational/numerator_spec.rb +++ b/spec/ruby/core/rational/numerator_spec.rb @@ -1,5 +1,10 @@ -require_relative '../../shared/rational/numerator' +require_relative "../../spec_helper" describe "Rational#numerator" do - it_behaves_like :rational_numerator, :numerator + it "returns the numerator" do + Rational(3, 4).numerator.should.equal?(3) + Rational(3, -4).numerator.should.equal?(-3) + + Rational(bignum_value, 1).numerator.should == bignum_value + end end |
