aboutsummaryrefslogtreecommitdiffstats
path: root/spec/ruby/core/integer/shared/to_i.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/core/integer/shared/to_i.rb')
-rw-r--r--spec/ruby/core/integer/shared/to_i.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/ruby/core/integer/shared/to_i.rb b/spec/ruby/core/integer/shared/to_i.rb
new file mode 100644
index 0000000000..7b974cd3a7
--- /dev/null
+++ b/spec/ruby/core/integer/shared/to_i.rb
@@ -0,0 +1,8 @@
+describe :integer_to_i, shared: true do
+ it "returns self" do
+ 10.send(@method).should eql(10)
+ (-15).send(@method).should eql(-15)
+ bignum_value.send(@method).should eql(bignum_value)
+ (-bignum_value).send(@method).should eql(-bignum_value)
+ end
+end