instiki/vendor/rails/activesupport/test/core_ext/symbol_test.rb

10 lines
275 B
Ruby
Raw Normal View History

require 'abstract_unit'
2007-01-22 14:43:50 +01:00
class SymbolTests < Test::Unit::TestCase
def test_to_proc
assert_equal %w(one two three), [:one, :two, :three].map(&:to_s)
assert_equal(%w(one two three),
{1 => "one", 2 => "two", 3 => "three"}.sort_by(&:first).map(&:last))
2007-01-22 14:43:50 +01:00
end
end