Sha256: 57332a4ca54ac7cd18194c23960186cb111fe81b0ee11e652be9dcdf7d2ed3f3
Contents?: true
Size: 378 Bytes
Versions: 13
Compression:
Stored size: 378 Bytes
Contents
require 'minitest/autorun' require 'shenanigans/kernel/fn' class Fn < MiniTest::Unit::TestCase def test_with_symbols result = ["foo bar", "baz qux"].map &fn(:split, :last) assert result == ["bar", "qux"] end def test_with_symbols_and_lambdas result = (1..3).map &fn(:next, -> x { x * x }, -> x { x.to_f / 2 } ) assert result == [2.0, 4.5, 8.0] end end
Version data entries
13 entries across 13 versions & 1 rubygems