Sha256: 00fc978f3e8d083922e8cc70d27154d4196f276402382faeae55497adf4bb3c0

Contents?: true

Size: 858 Bytes

Versions: 42

Compression:

Stored size: 858 Bytes

Contents

require 'simplecov'
SimpleCov.start do
  add_filter '/spec/'
end

$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
$LOAD_PATH.unshift(File.dirname(__FILE__))

require 'rspec'
require 'format_parser'
require 'pry'

module SpecHelpers
  def fixtures_dir
    __dir__ + '/fixtures/'
  end
end

RSpec.configure do |c|
  c.include SpecHelpers
  c.extend SpecHelpers # makes fixtures_dir available for example groups too
end

RSpec.shared_examples 'an IO object compatible with IOConstraint' do
  it 'responds to the same subset of public instance methods' do
    requisite_methods = FormatParser::IOConstraint.public_instance_methods - Object.public_instance_methods
    requisite_methods.each do |requisite|
      expect(described_class.public_instance_methods).to include(requisite), "#{described_class} must respond to #{requisite}"
    end
  end
end

Version data entries

42 entries across 42 versions & 1 rubygems

Version Path
format_parser-0.21.1 spec/spec_helper.rb
format_parser-0.21.0 spec/spec_helper.rb
format_parser-0.20.1 spec/spec_helper.rb
format_parser-0.20.0 spec/spec_helper.rb
format_parser-0.19.0 spec/spec_helper.rb
format_parser-0.18.0 spec/spec_helper.rb
format_parser-0.17.0 spec/spec_helper.rb
format_parser-0.16.1 spec/spec_helper.rb
format_parser-0.16.0 spec/spec_helper.rb
format_parser-0.15.1 spec/spec_helper.rb
format_parser-0.15.0 spec/spec_helper.rb
format_parser-0.14.1 spec/spec_helper.rb
format_parser-0.14.0 spec/spec_helper.rb
format_parser-0.13.6 spec/spec_helper.rb
format_parser-0.13.5 spec/spec_helper.rb
format_parser-0.13.4 spec/spec_helper.rb
format_parser-0.13.3 spec/spec_helper.rb
format_parser-0.13.2 spec/spec_helper.rb
format_parser-0.13.1 spec/spec_helper.rb
format_parser-0.13.0 spec/spec_helper.rb