Sha256: 335b1193666bbe6ec871b06cfa5d298740f8511c59dee1653760ed291d7228ea
Contents?: true
Size: 952 Bytes
Versions: 12
Compression:
Stored size: 952 Bytes
Contents
ENV['RAILS_ENV'] = 'test' ENV['RAILS_ROOT'] ||= File.join(File.dirname(__FILE__), 'rails3') if rsolr_version = ENV['RSOLR_GEM_VERSION'] STDERR.puts("Forcing RSolr version #{rsolr_version}") gem "rsolr", rsolr_version end require File.expand_path('config/environment', ENV['RAILS_ROOT']) begin require 'rspec' require 'rspec/rails' rescue LoadError => e require 'spec' require 'spec/rails' end require 'rake' require File.join('sunspot', 'rails', 'solr_logging') def load_schema stdout = $stdout $stdout = StringIO.new # suppress output while building the schema load File.join(ENV['RAILS_ROOT'], 'db', 'schema.rb') $stdout = stdout end def silence_stderr(&block) stderr = $stderr $stderr = StringIO.new yield $stderr = stderr end rspec = begin RSpec rescue NameError, ArgumentError Spec::Runner end rspec.configure do |config| config.before(:each) do load_schema Sunspot.remove_all! end end
Version data entries
12 entries across 12 versions & 4 rubygems