Sha256: 0b958e2b3d5cca3a507d8bb3de3c73bb25faab83006b60c94bcb4f03471e5c4d

Contents?: true

Size: 525 Bytes

Versions: 3

Compression:

Stored size: 525 Bytes

Contents

require 'spec/helper'

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('Ramaze::Inform').should == Ramaze::Inform
  end

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

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

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
ramaze-0.1.4 spec/snippets/kernel/constant.rb
ramaze-0.2.1 spec/snippets/kernel/constant.rb
ramaze-0.2.0 spec/snippets/kernel/constant.rb