diff options
Diffstat (limited to 'spec')
| -rw-r--r-- | spec/parcom_spec.cr | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/spec/parcom_spec.cr b/spec/parcom_spec.cr index 346e61b..bdf8b5b 100644 --- a/spec/parcom_spec.cr +++ b/spec/parcom_spec.cr @@ -163,7 +163,6 @@ end describe Assert do test_f = ->(x : Char) { x == 't' } - #p_proc = Assert.new(AnyToken(Char).new, test_f) p = AnyToken(Char).new.assert { |x| x == 't' } describe "#parse" do @@ -245,15 +244,13 @@ end describe Map do describe "#parse" do it "fails if the wrapped parser fails" do - id = ->(x : Char) { x } - p = Map.new(AnyToken(Char).new, id) + p = AnyToken(Char).new.map { |x| x } expect_raises(ParserException) { p.parse(TokenStream.new([] of Char)) } end it "changes the result value via the provided proc" do - is_letter = ->(x : Char) { x.letter? } - p = Map.new(AnyToken(Char).new, is_letter) + p = AnyToken(Char).new.map { |x| x.letter? } result = p.parse(TokenStream.from_string("testing")) result.value.should be_true |
