Sha256: 40072854e8848924647677344a1fac09beebf279a6679888f06ab2f6dbcf7943

Contents?: true

Size: 605 Bytes

Versions: 5

Compression:

Stored size: 605 Bytes

Contents

require 'yaml'
require 'pathname'
require 'unparser'
require 'anima'
require 'morpher'
require 'devtools/spec_helper'

require 'parser/current'
require 'parser/ruby19'
require 'parser/ruby20'
require 'parser/ruby21'
require 'parser/ruby22'

module SpecHelper
  def s(type, *children)
    Parser::AST::Node.new(type, children)
  end

  def strip(source)
    source = source.rstrip
    indent = source.scan(/^\s*/).min_by(&:length)
    source.gsub(/^#{indent}/, '')
  end

end

RSpec.configure do |config|
  config.include(SpecHelper)
  config.extend(SpecHelper)
  config.raise_errors_for_deprecations!
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
unparser-0.3.0 spec/spec_helper.rb
unparser-0.2.8 spec/spec_helper.rb
unparser-0.2.7 spec/spec_helper.rb
unparser-0.2.6 spec/spec_helper.rb
unparser-0.2.5 spec/spec_helper.rb