Sha256: 0bf40bc4a9a44cc05531d99e43c95d5fd16aed13b0f183fd2f3ac3404dd3df69

Contents?: true

Size: 1.09 KB

Versions: 13

Compression:

Stored size: 1.09 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
  config.filter_run :focused => true
  config.run_all_when_everything_filtered = true
end

Version data entries

13 entries across 13 versions & 2 rubygems

Version Path
rspec-expectations-2.0.1 spec/spec_helper.rb
gemrage-1.0.0 vendor/ruby/1.8/gems/rspec-expectations-2.0.0/spec/spec_helper.rb
gemrage-0.4.1 vendor/ruby/1.8/gems/rspec-expectations-2.0.0/spec/spec_helper.rb
gemrage-0.4.0 vendor/ruby/1.8/gems/rspec-expectations-2.0.0/spec/spec_helper.rb
gemrage-0.3.2 vendor/ruby/1.8/gems/rspec-expectations-2.0.0/spec/spec_helper.rb
gemrage-0.3.1 vendor/ruby/1.8/gems/rspec-expectations-2.0.0/spec/spec_helper.rb
gemrage-0.3.0 vendor/ruby/1.8/gems/rspec-expectations-2.0.0/spec/spec_helper.rb
gemrage-0.2.0 vendor/ruby/1.8/gems/rspec-expectations-2.0.0/spec/spec_helper.rb
gemrage-0.1.2 vendor/ruby/1.8/gems/rspec-expectations-2.0.0/spec/spec_helper.rb
gemrage-0.1.1 vendor/ruby/1.8/gems/rspec-expectations-2.0.0/spec/spec_helper.rb
gemrage-0.1.0 vendor/ruby/1.8/gems/rspec-expectations-2.0.0/spec/spec_helper.rb
gemrage-0.0.0 vendor/ruby/1.8/gems/rspec-expectations-2.0.0/spec/spec_helper.rb
rspec-expectations-2.0.0 spec/spec_helper.rb