Sha256: 89041795ed0e209a17543d8129ced4a2f31a9726f41f216b28779d68337297fb
Contents?: true
Size: 713 Bytes
Versions: 5
Compression:
Stored size: 713 Bytes
Contents
require File.expand_path('../test_helper.rb', File.dirname(__FILE__)) require 'ruby_parser' describe 'Using RipperRubyParser and RubyParser' do let :newparser do RipperRubyParser::Parser.new end let :oldparser do RubyParser.new end Dir.glob('test/**/*.rb').each do |file| describe "for #{file}" do let :program do File.read file end it 'gives the same result' do # Clone string because ruby_parser destroys it when there's a heredoc # inside. copy = program.clone original = oldparser.parse program imitation = newparser.parse copy formatted(imitation).must_equal formatted(original) end end end end
Version data entries
5 entries across 5 versions & 1 rubygems