diff options
Diffstat (limited to 'spec/ruby/core/rational/numerator_spec.rb')
| -rw-r--r-- | spec/ruby/core/rational/numerator_spec.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/spec/ruby/core/rational/numerator_spec.rb b/spec/ruby/core/rational/numerator_spec.rb index 6f9a9c0e3b..631bb4703c 100644 --- a/spec/ruby/core/rational/numerator_spec.rb +++ b/spec/ruby/core/rational/numerator_spec.rb @@ -1,6 +1,10 @@ require_relative "../../spec_helper" -require_relative '../../shared/rational/numerator' 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 |
