summaryrefslogtreecommitdiff
path: root/spec/ruby/core/rational/numerator_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/core/rational/numerator_spec.rb')
-rw-r--r--spec/ruby/core/rational/numerator_spec.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/ruby/core/rational/numerator_spec.rb b/spec/ruby/core/rational/numerator_spec.rb
new file mode 100644
index 0000000000..631bb4703c
--- /dev/null
+++ b/spec/ruby/core/rational/numerator_spec.rb
@@ -0,0 +1,10 @@
+require_relative "../../spec_helper"
+
+describe "Rational#numerator" do
+ 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