Sha256: 4a02a57290fa54b43972cf9cfaf91dd1f40d696c7d43e4aa6aa76512f825d0c8

Contents?: true

Size: 721 Bytes

Versions: 5

Compression:

Stored size: 721 Bytes

Contents

require File.dirname(__FILE__) + '/spec_helper.rb'

describe MPC, "when returning constants" do
  it "should have constants" do
    constants = MPC.constants
    [:RNDNN, :RNDNZ, :RNDNU, :RNDND, :RNDZN, :RNDZZ, :RNDZU, :RNDZD,
     :RNDUN, :RNDUZ, :RNDUU, :RNDUD, :RNDDN, :RNDDZ, :RNDDU, :RNDDD].each do |cst|
      constants.include?(cst).should be_true
      eval("MPC::#{cst}").should be_instance_of Fixnum
    end

    [:VERSION_MAJOR, :VERSION_MINOR, :VERSION_PATCHLEVEL].each do |cst|
      constants.include?(cst).should be_true
      eval("MPC::#{cst}").should be_instance_of Fixnum
    end

    constants.include?(:VERSION_STRING).should be_true
    MPC::VERSION_STRING.should be_instance_of String
  end

end


Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
ruby-mpc-0.0.6 spec/mpc/const_spec.rb
ruby-mpc-0.0.5 spec/mpc/const_spec.rb
ruby-mpc-0.0.4 spec/mpc/const_spec.rb
ruby-mpc-0.0.3 spec/mpc/const_spec.rb
ruby-mpc-0.0.2 spec/mpc/const_spec.rb