Sha256: 3673bc4ab7c1d55474cbe8daadf33b5fdf093a820b0a1dc942fde72c70742872

Contents?: true

Size: 838 Bytes

Versions: 39

Compression:

Stored size: 838 Bytes

Contents

ruby_version_is "1.9" do
  require File.expand_path('../../../shared/rational/rational_main', __FILE__)

  describe "Rational()" do
    describe "passed two arguments" do
      it_behaves_like(:rational_rational_two, :Rational)
    end

    describe "passed Integer" do
      it_behaves_like(:rational_rational_int, :Rational)
    end

    describe "passed two integers" do
      it_behaves_like(:rational_rational_int_int, :Rational)
    end

    it "raises a TypeError if the arguments are not Integers" do
      lambda {
        Rational(nil)
      }.should raise_error(TypeError)

      lambda {
        Rational(nil, 1)
      }.should raise_error(TypeError)

      lambda {
        Rational(:foo, 1)
      }.should raise_error(TypeError)

      lambda {
        Rational(:foo)
      }.should raise_error(TypeError)
    end
  end
end

Version data entries

39 entries across 39 versions & 2 rubygems

Version Path
rhodes-7.6.0 spec/framework_spec/app/spec/core/rational/rational_spec.rb
rhodes-7.5.1 spec/framework_spec/app/spec/core/rational/rational_spec.rb
rhodes-7.4.1 spec/framework_spec/app/spec/core/rational/rational_spec.rb
rhodes-7.1.17 spec/framework_spec/app/spec/core/rational/rational_spec.rb
rhodes-6.2.0 spec/framework_spec/app/spec/core/rational/rational_spec.rb
rhodes-6.0.11 spec/framework_spec/app/spec/core/rational/rational_spec.rb
rhodes-5.5.18 spec/framework_spec/app/spec/core/rational/rational_spec.rb
rhodes-5.5.17 spec/framework_spec/app/spec/core/rational/rational_spec.rb
rhodes-5.5.15 spec/framework_spec/app/spec/core/rational/rational_spec.rb
rhodes-5.5.0.22 spec/framework_spec/app/spec/core/rational/rational_spec.rb
rhodes-5.5.2 spec/framework_spec/app/spec/core/rational/rational_spec.rb
rhodes-5.5.0.7 spec/framework_spec/app/spec/core/rational/rational_spec.rb
rhodes-5.5.0.3 spec/framework_spec/app/spec/core/rational/rational_spec.rb
rhodes-5.5.0 spec/framework_spec/app/spec/core/rational/rational_spec.rb
tauplatform-1.0.3 spec/framework_spec/app/spec/core/rational/rational_spec.rb
tauplatform-1.0.2 spec/framework_spec/app/spec/core/rational/rational_spec.rb
tauplatform-1.0.1 spec/framework_spec/app/spec/core/rational/rational_spec.rb
rhodes-3.5.1.12 spec/framework_spec/app/spec/core/rational/Rational_spec.rb
rhodes-3.3.5 spec/framework_spec/app/spec/core/rational/Rational_spec.rb
rhodes-3.4.2 spec/framework_spec/app/spec/core/rational/Rational_spec.rb