Sha256: 988a72d91cc3a62789d4438b10b4fbb55532d264dd2de0629369ea1aed196236

Contents?: true

Size: 402 Bytes

Versions: 13

Compression:

Stored size: 402 Bytes

Contents

# coding: utf-8

shared_context 'AST', :ast do
  let(:root_node) do
    fail '#source must be defined with #let' unless respond_to?(:source)

    require 'astrolabe/builder'
    require 'parser/current'

    buffer = Parser::Source::Buffer.new('(string)')
    buffer.source = source

    builder = Astrolabe::Builder.new
    parser = Parser::CurrentRuby.new(builder)
    parser.parse(buffer)
  end
end

Version data entries

13 entries across 13 versions & 2 rubygems

Version Path
rubyjobbuilderdsl-0.0.2 vendor/bundle/ruby/2.1.0/gems/astrolabe-1.3.0/spec/support/shared_contexts.rb
rubyjobbuilderdsl-0.0.1 vendor/bundle/ruby/2.1.0/gems/astrolabe-1.3.0/spec/support/shared_contexts.rb
astrolabe-1.3.1 spec/support/shared_contexts.rb
astrolabe-1.3.0 spec/support/shared_contexts.rb
astrolabe-1.2.1 spec/support/shared_contexts.rb
astrolabe-1.1.0 spec/support/shared_contexts.rb
astrolabe-1.0.0 spec/support/shared_contexts.rb
astrolabe-0.6.0 spec/support/shared_contexts.rb
astrolabe-0.5.2 spec/support/shared_contexts.rb
astrolabe-0.5.1 spec/support/shared_contexts.rb
astrolabe-0.5.0 spec/support/shared_contexts.rb
astrolabe-0.4.0 spec/support/shared_contexts.rb
astrolabe-0.3.0 spec/support/shared_contexts.rb