]> git.wincent.com - walrat.git/blob - spec/additions/proc_spec.rb
Don't shadow "proc" method
[walrat.git] / spec / additions / proc_spec.rb
1 # Copyright 2007-2014 Greg Hurrell. All rights reserved.
2 # Licensed under the terms of the BSD 2-clause license.
3
4 require 'spec_helper'
5
6 describe 'proc additions' do
7   it 'responds to "to_parseable", "parse" and "memoizing_parse"' do
8     fn = lambda { |string, options| 'foo' }.to_parseable
9     expect(fn.parse('bar')).to eq('foo')
10     expect(fn.memoizing_parse('bar')).to eq('foo')
11   end
12 end