Sha256: ad505c2a0a99e5a160596eaa0d8d7c5a6cafc5075f039f564e5b397648299819

Contents?: true

Size: 790 Bytes

Versions: 3

Compression:

Stored size: 790 Bytes

Contents

require 'parslet'

require 'parslet/rig/rspec'
require 'parslet/atoms/visitor'
require 'parslet/export'

RSpec.configure do |config|
  config.mock_with :flexmock

  begin
    # Here's to the worst idea ever, rspec. This is why we'll be leaving you soon.
    config.expect_with :rspec do |c|
      c.syntax = [:should, :expect]
    end
  rescue NoMethodError
    # If the feature is missing, ignore it. 
  end
  
  # Exclude other ruby versions by giving :ruby => 1.8 or :ruby => 1.9
  #
  config.filter_run_excluding :ruby => lambda { |version|
    RUBY_VERSION.to_s !~ /^#{Regexp.escape(version.to_s)}/
  }
end

def catch_failed_parse
  begin
    yield
  rescue Parslet::ParseFailed => exception
  end
  exception.cause
end

def slet name, &block
  let(name, &block)
  subject(&block)
end

Version data entries

3 entries across 3 versions & 2 rubygems

Version Path
swift-pyrite-0.1.1 vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/spec/spec_helper.rb
swift-pyrite-0.1.0 vendor/bundle/ruby/2.0.0/gems/parslet-1.7.1/spec/spec_helper.rb
parslet-1.7.1 spec/spec_helper.rb