Sha256: c947b7683e226ed031cff38e6a41e0b817f10b0b22bee64e79a028d5251f0d0b

Contents?: true

Size: 444 Bytes

Versions: 2

Compression:

Stored size: 444 Bytes

Contents

# encoding: utf-8

require 'unparser'
require 'devtools/spec_helper'

require 'parser/current'
require 'parser/ruby21'

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)
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
unparser-0.1.7 spec/spec_helper.rb
unparser-0.1.6 spec/spec_helper.rb