diff options
Diffstat (limited to 'spec/ruby/core/fixnum/to_f_spec.rb')
-rw-r--r-- | spec/ruby/core/fixnum/to_f_spec.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/ruby/core/fixnum/to_f_spec.rb b/spec/ruby/core/fixnum/to_f_spec.rb new file mode 100644 index 0000000000..1d66348a5a --- /dev/null +++ b/spec/ruby/core/fixnum/to_f_spec.rb @@ -0,0 +1,9 @@ +require File.expand_path('../../../spec_helper', __FILE__) + +describe "Fixnum#to_f" do + it "returns self converted to a Float" do + 0.to_f.should == 0.0 + -500.to_f.should == -500.0 + 9_641_278.to_f.should == 9641278.0 + end +end |