diff options
Diffstat (limited to 'spec/ruby/core/rational/marshal_dump_spec.rb')
-rw-r--r-- | spec/ruby/core/rational/marshal_dump_spec.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/ruby/core/rational/marshal_dump_spec.rb b/spec/ruby/core/rational/marshal_dump_spec.rb new file mode 100644 index 0000000000..46e9267ebd --- /dev/null +++ b/spec/ruby/core/rational/marshal_dump_spec.rb @@ -0,0 +1,11 @@ +require File.expand_path('../../../spec_helper', __FILE__) + +describe "Rational#marshal_dump" do + it "is a private method" do + Rational.should have_private_instance_method(:marshal_dump, false) + end + + it "dumps numerator and denominator" do + Rational(1, 2).send(:marshal_dump).should == [1, 2] + end +end |