aboutsummaryrefslogtreecommitdiffstats
path: root/spec/ruby/core/rational/divmod_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/core/rational/divmod_spec.rb')
-rw-r--r--spec/ruby/core/rational/divmod_spec.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/spec/ruby/core/rational/divmod_spec.rb b/spec/ruby/core/rational/divmod_spec.rb
new file mode 100644
index 0000000000..ee03c9498a
--- /dev/null
+++ b/spec/ruby/core/rational/divmod_spec.rb
@@ -0,0 +1,13 @@
+require File.expand_path('../../../shared/rational/divmod', __FILE__)
+
+describe "Rational#divmod when passed a Rational" do
+ it_behaves_like(:rational_divmod_rat, :divmod)
+end
+
+describe "Rational#divmod when passed an Integer" do
+ it_behaves_like(:rational_divmod_int, :divmod)
+end
+
+describe "Rational#divmod when passed a Float" do
+ it_behaves_like(:rational_divmod_float, :divmod)
+end