Sha256: 2644827bf7e554e3be1665ad6565b659210705962bc79473187ea8d18cc8da10

Contents?: true

Size: 590 Bytes

Versions: 6

Compression:

Stored size: 590 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('lib/**/*.rb').each do |file|
    describe "for #{file}" do
      let :program do
        File.read file
      end

      it 'gives the same result' do
        original = oldparser.parse program
        imitation = newparser.parse program

        formatted(imitation).must_equal formatted(original)
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
ripper_ruby_parser-1.4.2 test/end_to_end/lib_comparison_test.rb
ripper_ruby_parser-1.4.1 test/end_to_end/lib_comparison_test.rb
ripper_ruby_parser-1.4.0 test/end_to_end/lib_comparison_test.rb
ripper_ruby_parser-1.3.0 test/end_to_end/lib_comparison_test.rb
ripper_ruby_parser-1.2.0 test/end_to_end/lib_comparison_test.rb
ripper_ruby_parser-1.1.2 test/end_to_end/lib_comparison_test.rb