Sha256: 570c0b916611b30e13b41eced76b46b4e999afc1d0837a594532a482fec15e3b

Contents?: true

Size: 777 Bytes

Versions: 17

Compression:

Stored size: 777 Bytes

Contents

# frozen_string_literal: true

require 'spec_helper'

RSpec.describe ThinkingSphinx::Commands::Configure do
  let(:command)    { ThinkingSphinx::Commands::Configure.new(
    configuration, {}, stream
  ) }
  let(:configuration) { double 'configuration' }
  let(:stream)        { double :puts => nil }

  before :each do
    allow(configuration).to receive_messages(
      :configuration_file => '/path/to/foo.conf',
      :render_to_file     => true
    )
  end

  it "renders the configuration to a file" do
    expect(configuration).to receive(:render_to_file)

    command.call
  end

  it "prints a message stating the file is being generated" do
    expect(stream).to receive(:puts).
      with('Generating configuration to /path/to/foo.conf')

    command.call
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
thinking-sphinx-5.6.0 spec/thinking_sphinx/commands/configure_spec.rb
thinking-sphinx-5.5.1 spec/thinking_sphinx/commands/configure_spec.rb
thinking-sphinx-5.5.0 spec/thinking_sphinx/commands/configure_spec.rb
thinking-sphinx-5.4.0 spec/thinking_sphinx/commands/configure_spec.rb
thinking-sphinx-5.3.0 spec/thinking_sphinx/commands/configure_spec.rb
thinking-sphinx-5.2.1 spec/thinking_sphinx/commands/configure_spec.rb
thinking-sphinx-5.2.0 spec/thinking_sphinx/commands/configure_spec.rb
thinking-sphinx-5.1.0 spec/thinking_sphinx/commands/configure_spec.rb
thinking-sphinx-5.0.0 spec/thinking_sphinx/commands/configure_spec.rb
thinking-sphinx-4.4.1 spec/thinking_sphinx/commands/configure_spec.rb
thinking-sphinx-4.4.0 spec/thinking_sphinx/commands/configure_spec.rb
thinking-sphinx-4.3.2 spec/thinking_sphinx/commands/configure_spec.rb
thinking-sphinx-4.3.1 spec/thinking_sphinx/commands/configure_spec.rb
thinking-sphinx-4.3.0 spec/thinking_sphinx/commands/configure_spec.rb
thinking-sphinx-4.2.0 spec/thinking_sphinx/commands/configure_spec.rb
thinking-sphinx-4.1.0 spec/thinking_sphinx/commands/configure_spec.rb
thinking-sphinx-4.0.0 spec/thinking_sphinx/commands/configure_spec.rb