Sha256: 376b3bdc2114ffd5929b4c3fab43a686e1617784f40a4a3f938941c9a15928f8

Contents?: true

Size: 354 Bytes

Versions: 8

Compression:

Stored size: 354 Bytes

Contents

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

describe 'Symbol#to_proc' do
  it 'should convert symbols to procs' do
    [:one, :two, :three].map(&:to_s).should == %w[ one two three ]
  end

  it 'should work with list objects' do
    { 1 => "one",
      2 => "two",
      3 => "three" }.sort_by(&:first).map(&:last).should == %w[ one two three ]
  end
end

Version data entries

8 entries across 8 versions & 3 rubygems

Version Path
clivecrous-ramaze-0.3.9.5 spec/snippets/symbol/to_proc.rb
manveru-ramaze-2008.07 spec/snippets/symbol/to_proc.rb
manveru-ramaze-2008.08 spec/snippets/symbol/to_proc.rb
ramaze-0.3.0 spec/snippets/symbol/to_proc.rb
ramaze-0.3.5 spec/snippets/symbol/to_proc.rb
ramaze-2008.06 spec/snippets/symbol/to_proc.rb
ramaze-0.3.9 spec/snippets/symbol/to_proc.rb
ramaze-0.3.9.1 spec/snippets/symbol/to_proc.rb