lib/mail/vendor/treetop-1.4.3/spec/spec_helper.rb in mail-2.1.3 vs lib/mail/vendor/treetop-1.4.3/spec/spec_helper.rb in mail-2.1.5

- old
+ new

@@ -1,14 +1,12 @@ -dir = File.dirname(__FILE__) require 'rubygems' require 'benchmark' require 'spec' require 'polyglot' -unless $bootstrapped_gen_1_metagrammar - load File.join(dir, '..', 'lib', 'treetop', 'bootstrap_gen_1_metagrammar.rb') -end +$LOAD_PATH.unshift File.expand_path('../../lib') +require 'treetop' include Treetop Spec::Runner.configure do |config| config.mock_with :rr end @@ -64,10 +62,11 @@ yield result if block_given? result end def parse_multibyte(input, options = {}) + require 'active_support/all' parse(input.mb_chars, options) end def compiling_grammar(grammar_under_test) lambda { @@ -105,7 +104,7 @@ class Symbol def to_proc lambda do |x| x.send(self) end - end + end unless method_defined?(:to_proc) end