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

Version Path
rspec-expectations-2.0.0.rc spec/spec_helper.rb
rspec-expectations-2.0.0.beta.22 spec/spec_helper.rb
rspec-expectations-2.0.0.beta.20 spec/spec_helper.rb
rspec-expectations-2.0.0.beta.19 spec/spec_helper.rb
rspec-expectations-2.0.0.beta.18 spec/spec_helper.rb
rspec-expectations-2.0.0.beta.17 spec/spec_helper.rb
rspec-expectations-2.0.0.beta.16 spec/spec_helper.rb
rspec-expectations-2.0.0.beta.15 spec/spec_helper.rb
rspec-expectations-2.0.0.beta.14 spec/spec_helper.rb
rspec-expectations-2.0.0.beta.13 spec/spec_helper.rb
rspec-expectations-2.0.0.beta.12 spec/spec_helper.rb
rspec-expectations-2.0.0.beta.11 spec/spec_helper.rb
rspec-expectations-2.0.0.beta.10 spec/spec_helper.rb
rspec-expectations-2.0.0.beta.9 spec/spec_helper.rb