Sha256: 51f6baa5985fc562a7dd68888e2f6d7652759429851d8c8d8591ea1c5831fd68

Contents?: true

Size: 733 Bytes

Versions: 3

Compression:

Stored size: 733 Bytes

Contents

require File.join(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

3 entries across 3 versions & 1 rubygems

Version Path
ruby-mpc-0.0.9 spec/mpc/const_spec.rb
ruby-mpc-0.0.8 spec/mpc/const_spec.rb
ruby-mpc-0.0.7 spec/mpc/const_spec.rb