Sha256: d5287bc0da66d595ca8ecb55b1e7649d0348f8add8765eaec054b948a868bf90

Contents?: true

Size: 910 Bytes

Versions: 5

Compression:

Stored size: 910 Bytes

Contents

Encoding.default_external = Encoding::UTF_8

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

# Configure simplecov gem (must be here at top of file)
require 'simplecov'
SimpleCov.start do
  add_filter 'spec' # Don't include RSpec stuff
  add_group 'Types', 'lib/attributor/types'
end

require 'rspec'
require 'attributor'

require 'pry'

# Requires supporting files with custom matchers and macros, etc,
# in ./support/ and its subdirectories.
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }

RSpec.configure do |config|

  config.around(:each) do |example|
    Attributor::AttributeResolver.current = Attributor::AttributeResolver.new
    example.run
    Attributor::AttributeResolver.current = nil
  end

end

RSpec::Matchers.define :be_in_family do |expected|
  match do |actual|
    actual.family == expected
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
attributor-4.0.1 spec/spec_helper.rb
attributor-4.0.0 spec/spec_helper.rb
attributor-3.0.1 spec/spec_helper.rb
attributor-3.0 spec/spec_helper.rb
attributor-2.6.1 spec/spec_helper.rb