Sha256: 7ccf552c8da47d4eda3e6ea899b7852e833b320ec6be254c5825994ff755e75b

Contents?: true

Size: 747 Bytes

Versions: 3

Compression:

Stored size: 747 Bytes

Contents

require 'spec_helper'

RSpec.describe ThinkingSphinx::Commands::Index do
  let(:command)    { ThinkingSphinx::Commands::Index.new(
    configuration, {:verbose => true}, stream
  ) }
  let(:configuration) { double 'configuration', :controller => controller }
  let(:controller)    { double 'controller', :index => true }
  let(:stream)        { double :puts => nil }

  it "indexes all indices verbosely" do
    expect(controller).to receive(:index).with(:verbose => true)

    command.call
  end

  it "does not index verbosely if requested" do
    command = ThinkingSphinx::Commands::Index.new(
      configuration, {:verbose => false}, stream
    )

    expect(controller).to receive(:index).with(:verbose => false)

    command.call
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
thinking-sphinx-3.4.2 spec/thinking_sphinx/commands/index_spec.rb
thinking-sphinx-3.4.1 spec/thinking_sphinx/commands/index_spec.rb
thinking-sphinx-3.4.0 spec/thinking_sphinx/commands/index_spec.rb