Sha256: 7dad6038c8d2c7e06c7379d089f0dfabaa310648d0b2c73e71fdf31bbd1a9e11

Contents?: true

Size: 579 Bytes

Versions: 3

Compression:

Stored size: 579 Bytes

Contents

# frozen_string_literal: true

require 'spec_helper'

RSpec.describe ThinkingSphinx::Commands::Prepare do
  let(:command)       { ThinkingSphinx::Commands::Prepare.new(
    configuration, {}, stream
  ) }
  let(:configuration) { double 'configuration',
    :indices_location => '/path/to/indices'
  }
  let(:stream)        { double :puts => nil }

  before :each do
    allow(FileUtils).to receive_messages :mkdir_p => true
  end

  it "creates the directory for the index files" do
    expect(FileUtils).to receive(:mkdir_p).with('/path/to/indices')

    command.call
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
thinking-sphinx-4.2.0 spec/thinking_sphinx/commands/prepare_spec.rb
thinking-sphinx-4.1.0 spec/thinking_sphinx/commands/prepare_spec.rb
thinking-sphinx-4.0.0 spec/thinking_sphinx/commands/prepare_spec.rb