Sha256: bd651eeedd3092937c012a9690afe138c9494f9104d7adcacd2daa253acfe5d4

Contents?: true

Size: 999 Bytes

Versions: 17

Compression:

Stored size: 999 Bytes

Contents

using_gems = false
begin
  require 'spec'
  begin
    require 'ruby-debug'
  rescue LoadError => e
    if using_gems
      module Kernel
        def debugger
          STDERR.puts('Debugger is not available')
        end
      end
    else
      raise(e)
    end
  end
  if ENV['USE_WILL_PAGINATE']
    require 'will_paginate'
    require 'will_paginate/collection'
  end
rescue LoadError => e
  require 'rubygems'
  if using_gems
    raise(e)
  else
    using_gems = true
    retry
  end
end

unless gem_name = ENV['SUNSPOT_TEST_GEM']
  $:.unshift(File.dirname(__FILE__) + '/../lib')
else
  gem gem_name
end
require 'sunspot'

require File.join(File.dirname(__FILE__), 'mocks', 'mock_record.rb')
Dir.glob(File.join(File.dirname(__FILE__), 'mocks', '**', '*.rb')).each do |file|
  require file unless File.basename(file) == 'mock_record.rb'
end

def without_class(clazz)
  Object.class_eval { remove_const(clazz.name.to_sym) }
  yield
  Object.class_eval { const_set(clazz.name.to_sym, clazz) }
end

Version data entries

17 entries across 17 versions & 6 rubygems

Version Path
Chrononaut-sunspot-client-0.9.4 spec/spec_helper.rb
UnderpantsGnome-sunspot-0.9.1.1 spec/spec_helper.rb
UnderpantsGnome-sunspot-0.9.8.1 spec/spec_helper.rb
kristopher-sunspot-0.9.8 spec/spec_helper.rb
kuahyeow-sunspot-0.9.7 spec/spec_helper.rb
kuahyeow-sunspot-0.9.8 spec/spec_helper.rb
outoftime-sunspot-0.9.0 spec/spec_helper.rb
outoftime-sunspot-0.9.1 spec/spec_helper.rb
outoftime-sunspot-0.9.2 spec/spec_helper.rb
outoftime-sunspot-0.9.3 spec/spec_helper.rb
outoftime-sunspot-0.9.4 spec/spec_helper.rb
outoftime-sunspot-0.9.5 spec/spec_helper.rb
outoftime-sunspot-0.9.6 spec/spec_helper.rb
outoftime-sunspot-0.9.7 spec/spec_helper.rb
outoftime-sunspot-0.9.8 spec/spec_helper.rb
sunspot-0.9.8 spec/spec_helper.rb
sunspot-0.9.7 spec/spec_helper.rb