Sha256: 7932e6be337dd3f8bfd9be59c73197d62bf32b3a97ffdfa2814cd82d5c8a5476
Contents?: true
Size: 474 Bytes
Versions: 22
Compression:
Stored size: 474 Bytes
Contents
require 'spec_helper' describe Rational do describe "monkey patches" do it "should render a simplified fraction as an Array" do expect(Rational(4,3).to_simplified_a).to eql([1, Rational(1,3)]) end it "should render a proper fraction as String" do expect(Rational(2,3).to_simplified_a).to eql("2/3") end it "should render a simplified fraction as a String" do expect(Rational(4,3).to_simplified_s).to eql("1 1/3") end end end
Version data entries
22 entries across 22 versions & 1 rubygems