Sha256: 63fdad25a532be9aef1313491817af765d34f53a9a120bcdad9a041f3c498739
Contents?: true
Size: 1 KB
Versions: 14
Compression:
Stored size: 1 KB
Contents
def add_to_load_path(path, prepend=false) path = File.expand_path("../#{path}", __FILE__) if prepend $LOAD_PATH.unshift(path) unless $LOAD_PATH.include?(path) else $LOAD_PATH << path unless $LOAD_PATH.include?(path) end end add_to_load_path("../lib", :prepend) add_to_load_path("../../rspec-core/lib") add_to_load_path("../../rspec-mocks/lib") require 'rspec/core' require 'rspec/mocks' Dir['./spec/support/**/*'].each do |f| require f end def with_ruby(version) yield if RUBY_PLATFORM =~ Regexp.compile("^#{version}") end module RSpec module Ruby class << self def version RUBY_VERSION end end end end module RSpec module Matchers def fail raise_error(RSpec::Expectations::ExpectationNotMetError) end def fail_with(message) raise_error(RSpec::Expectations::ExpectationNotMetError, message) end end end RSpec::configure do |config| config.mock_with(:rspec) config.include RSpec::Mocks::Methods config.color_enabled = true end
Version data entries
14 entries across 14 versions & 1 rubygems