Sha256: aa892ae9b69f546a6f3b6fd5549514d0a911588c90d6bfb925bbf85dc4101940

Contents?: true

Size: 1.12 KB

Versions: 7

Compression:

Stored size: 1.12 KB

Contents

require 'spec_helper'
require 'ej'

describe Ej::Commands do
  before do
  end

  it "should exists search option" do
    output = capture_stdout do
      Ej::Commands.start(['help', 'search'])
    end
    output.should include('--type')
    output.should include('--fields')
    output.should include('--query')
    output.should include('--size')
    output.should include('--from')
    output.should include('--source-only')
  end

  it "should exists copy option" do
    output = capture_stdout do
      Ej::Commands.start(['help', 'copy'])
    end
    output.should include('--source')
    output.should include('--dest')
    output.should include('--query')
  end

  it "should exists delete option" do
    output = capture_stdout do
      Ej::Commands.start(['help', 'delete'])
    end
    output.should include('--query')
    output.should include('--index')
    output.should include('--type')
  end

  it "should default check" do
    output = capture_stdout do
      Ej::Commands.start(['help', 'search'])
    end
    output.should include("Default: localhost")
    output.should include("Default: _all")
  end

  after do
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
ej-0.1.4 spec/commands_spec.rb
ej-0.1.3 spec/commands_spec.rb
ej-0.1.2 spec/commands_spec.rb
ej-0.1.1 spec/commands_spec.rb
ej-0.1.0 spec/commands_spec.rb
ej-0.0.12 spec/commands_spec.rb
ej-0.0.10 spec/commands_spec.rb