Sha256: 3d6499194d212ad7225db6ed51036b136014710f2fa3d9f86769993956983012
Contents?: true
Size: 371 Bytes
Versions: 2
Compression:
Stored size: 371 Bytes
Contents
require "minitest/autorun" require "shenanigans/kernel/fn" class Fn < Minitest::Test 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
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
shenanigans-1.0.15 | test/kernel/fn_test.rb |
shenanigans-1.0.14 | test/kernel/fn_test.rb |