Sha256: b4a5518d9d8f2346cc264f4e03c3763d68b837fafb8e81bd77c04e9e2d4eda78

Contents?: true

Size: 646 Bytes

Versions: 3

Compression:

Stored size: 646 Bytes

Contents

$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
require 'gisele'
require 'epath'

def capture_io
  stdout, stderr = $stdout, $stderr
  $stdout, $stderr = StringIO.new, StringIO.new
  yield
  [$stdout.string, $stderr.string]
ensure
  $stdout, $stderr = stdout, stderr
end

module SpecHelpers

  def fixtures_dir
    (Path.dir/:fixtures)
  end

  def fixture_files(glob)
    fixtures_dir.glob(glob)
  end

  def simple_ast
    Gisele::ast(fixtures_dir/:tasks/"simple.gis")
  end

  def complete_ast
    Gisele::ast(fixtures_dir/:tasks/"complete.gis")
  end

end

RSpec.configure do |c|
  c.extend  SpecHelpers
  c.include SpecHelpers
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
gisele-0.6.0 spec/spec_helper.rb
gisele-0.5.1 spec/spec_helper.rb
gisele-0.2.0 spec/spec_helper.rb