test/parse_helper.rb in parser-2.2.2.6 vs test/parse_helper.rb in parser-2.2.3.0
- old
+ new
@@ -6,12 +6,14 @@
ALL_VERSIONS = %w(1.8)
else
require 'parser/all'
require 'parser/ruby22'
+ require 'parser/macruby'
+ require 'parser/rubymotion'
- ALL_VERSIONS = %w(1.8 1.9 2.0 2.1 2.2)
+ ALL_VERSIONS = %w(1.8 1.9 2.0 2.1 2.2 mac ios)
end
def setup
@diagnostics = []
@@ -23,9 +25,11 @@
when '1.8' then parser = Parser::Ruby18.new
when '1.9' then parser = Parser::Ruby19.new
when '2.0' then parser = Parser::Ruby20.new
when '2.1' then parser = Parser::Ruby21.new
when '2.2' then parser = Parser::Ruby22.new
+ when 'mac' then parser = Parser::MacRuby.new
+ when 'ios' then parser = Parser::RubyMotion.new
else raise "Unrecognized Ruby version #{version}"
end
parser.diagnostics.consumer = lambda do |diagnostic|
@diagnostics << diagnostic