Sha256: 2e020417167278060f2cae826b855e7875a8d1d2398905ffbec0b5b9e58d55ef

Contents?: true

Size: 511 Bytes

Versions: 31

Compression:

Stored size: 511 Bytes

Contents

require 'lib/ramaze/spec/helper/snippets'

describe 'constant' do
  it 'should load from string' do
    constant('Fixnum').should == Fixnum
  end

  it 'should load from symbol' do
    constant(:Fixnum).should == Fixnum
  end

  it 'should handle hierarchy' do
    constant('Math::PI').should == Math::PI
  end

  it 'should be callable with explicit self' do
    Math.constant('PI').should == Math::PI
  end

  it 'should be callable with explicit self' do
    Math.constant('::Math').should == Math
  end
end

Version data entries

31 entries across 31 versions & 5 rubygems

Version Path
Pistos-ramaze-2008.09 spec/snippets/kernel/constant.rb
Pistos-ramaze-2008.12 spec/snippets/kernel/constant.rb
Pistos-ramaze-2009.01 spec/snippets/kernel/constant.rb
Pistos-ramaze-2009.02 spec/snippets/kernel/constant.rb
Pistos-ramaze-2009.04.08 spec/snippets/kernel/constant.rb
clivecrous-ramaze-0.3.9.5 spec/snippets/kernel/constant.rb
manveru-ramaze-2008.07 spec/snippets/kernel/constant.rb
manveru-ramaze-2008.08 spec/snippets/kernel/constant.rb
manveru-ramaze-2008.09 spec/snippets/kernel/constant.rb
manveru-ramaze-2008.10 spec/snippets/kernel/constant.rb
manveru-ramaze-2008.12 spec/snippets/kernel/constant.rb
manveru-ramaze-2009.01 spec/snippets/kernel/constant.rb
manveru-ramaze-2009.04.01 spec/snippets/kernel/constant.rb
manveru-ramaze-2009.04.08 spec/snippets/kernel/constant.rb
manveru-ramaze-2009.04.18 spec/snippets/kernel/constant.rb
manveru-ramaze-2009.04.22 spec/snippets/kernel/constant.rb
manveru-ramaze-2009.04 spec/snippets/kernel/constant.rb
manveru-ramaze-2009.05 spec/snippets/kernel/constant.rb
ptomato-ramaze-2009.02.1 spec/snippets/kernel/constant.rb
ptomato-ramaze-2009.02 spec/snippets/kernel/constant.rb