summaryrefslogtreecommitdiff
path: root/spec/ruby/core/fixnum/fixnum_spec.rb
blob: 8a050fd25e75bc135efb2b00d1250f41eb4e9659 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
require File.expand_path('../../../spec_helper', __FILE__)

describe "Fixnum" do
  it "includes Comparable" do
    Fixnum.include?(Comparable).should == true
  end

  it ".allocate raises a TypeError" do
    lambda do
      Fixnum.allocate
    end.should raise_error(TypeError)
  end

  it ".new is undefined" do
    lambda do
      Fixnum.new
    end.should raise_error(NoMethodError)
  end
end