Sha256: 3dde356061c050c589e1e7cf8d048a18717c7f5307815ad15ae76498811f2819

Contents?: true

Size: 548 Bytes

Versions: 6

Compression:

Stored size: 548 Bytes

Contents

ENV['RAILS_ENV'] = 'test'
ENV['RAILS_ROOT'] ||= File.join(File.dirname(__FILE__), 'mock_app')

require File.expand_path(File.join(ENV['RAILS_ROOT'], 'config', 'environment.rb'))

require 'spec'
require 'spec/rails'
require 'ruby-debug'

def load_schema
  stdout = $stdout
  $stdout = StringIO.new # suppress output while building the schema
  load File.join(File.dirname(__FILE__), 'schema.rb')
  $stdout = stdout
end

Spec::Runner.configure do |config|
  config.before(:each) do
    Sunspot.remove_all
    Sunspot.commit
    load_schema
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
outoftime-sunspot_rails-0.9.10 spec/spec_helper.rb
outoftime-sunspot_rails-0.9.4 spec/spec_helper.rb
outoftime-sunspot_rails-0.9.6 spec/spec_helper.rb
outoftime-sunspot_rails-0.9.7 spec/spec_helper.rb
outoftime-sunspot_rails-0.9.8 spec/spec_helper.rb
outoftime-sunspot_rails-0.9.9 spec/spec_helper.rb