Sha256: cf92a82c57c6d35ba07fe4492db112a6be125f39f17a080c35e81aa06a375a58

Contents?: true

Size: 430 Bytes

Versions: 2

Compression:

Stored size: 430 Bytes

Contents

module SphinxHelpers
  def sphinx
    @sphinx ||= SphinxController.new
  end

  def index(*indices)
    yield if block_given?

    sphinx.index *indices
    sleep 0.25
  end
end

RSpec.configure do |config|
  config.include SphinxHelpers

  config.before :all do |group|
    sphinx.setup && sphinx.start if group.class.metadata[:live]
  end

  config.after :all do |group|
    sphinx.stop if group.class.metadata[:live]
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
thinking-sphinx-3.0.0.rc spec/acceptance/support/sphinx_helpers.rb
thinking-sphinx-3.0.0.pre spec/acceptance/support/sphinx_helpers.rb