summaryrefslogtreecommitdiff
path: root/spec/ruby/core/numeric/to_int_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/core/numeric/to_int_spec.rb')
-rw-r--r--spec/ruby/core/numeric/to_int_spec.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/ruby/core/numeric/to_int_spec.rb b/spec/ruby/core/numeric/to_int_spec.rb
new file mode 100644
index 0000000000..4f1df3e042
--- /dev/null
+++ b/spec/ruby/core/numeric/to_int_spec.rb
@@ -0,0 +1,10 @@
+require File.expand_path('../../../spec_helper', __FILE__)
+require File.expand_path('../fixtures/classes', __FILE__)
+
+describe "Numeric#to_int" do
+ it "returns self#to_i" do
+ obj = NumericSpecs::Subclass.new
+ obj.should_receive(:to_i).and_return(:result)
+ obj.to_int.should == :result
+ end
+end