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-3.3.4 spec/framework_spec/app/spec/core/rational/Rational_spec.rb
rhodes-3.3.3 spec/framework_spec/app/spec/core/rational/Rational_spec.rb
rhodes-3.3.3.beta.4 spec/framework_spec/app/spec/core/rational/Rational_spec.rb
rhodes-3.3.3.beta.3 spec/framework_spec/app/spec/core/rational/Rational_spec.rb
rhodes-3.3.3.beta.2 spec/framework_spec/app/spec/core/rational/Rational_spec.rb
rhodes-3.3.3.beta.1 spec/framework_spec/app/spec/core/rational/Rational_spec.rb
rhodes-3.3.2 spec/framework_spec/app/spec/core/rational/Rational_spec.rb
rhodes-3.3.2.beta.7 spec/framework_spec/app/spec/core/rational/Rational_spec.rb
rhodes-3.3.2.beta.6 spec/framework_spec/app/spec/core/rational/Rational_spec.rb
rhodes-3.3.2.beta.5 spec/framework_spec/app/spec/core/rational/Rational_spec.rb
rhodes-3.3.2.beta.4 spec/framework_spec/app/spec/core/rational/Rational_spec.rb
rhodes-3.3.2.beta.3 spec/framework_spec/app/spec/core/rational/Rational_spec.rb
rhodes-3.3.2.beta.2 spec/framework_spec/app/spec/core/rational/Rational_spec.rb
rhodes-3.3.2.beta.1 spec/framework_spec/app/spec/core/rational/Rational_spec.rb
rhodes-3.3.1 spec/framework_spec/app/spec/core/rational/Rational_spec.rb
rhodes-3.3.0 spec/framework_spec/app/spec/core/rational/Rational_spec.rb
rhodes-3.3.0.beta.3 spec/framework_spec/app/spec/core/rational/Rational_spec.rb
rhodes-3.3.0.beta.2 spec/framework_spec/app/spec/core/rational/Rational_spec.rb
rhodes-3.3.0.beta.1 spec/framework_spec/app/spec/core/rational/Rational_spec.rb