Sha256: 97ac552d89c51ba65adc607fcb1a0950ab10ae7cbe8c0051d95b4562cd840ebd

Contents?: true

Size: 971 Bytes

Versions: 8

Compression:

Stored size: 971 Bytes

Contents

# encoding: utf-8
require 'spec_helper'
require 'pluginmanager/main'

describe LogStash::PluginManager::Install do
  let(:cmd) { LogStash::PluginManager::Install.new("install") }

  before(:each) do
    expect(cmd).to receive(:validate_cli_options!).and_return(nil)
  end

  context "when validating plugins" do
    let(:sources) { ["https://rubygems.org", "http://localhost:9292"] }

    before(:each) do
      expect(cmd).to receive(:plugins_gems).and_return([["dummy", nil]])
      expect(cmd).to receive(:install_gems_list!).and_return(nil)
      expect(cmd).to receive(:remove_unused_locally_installed_gems!).and_return(nil)
      cmd.verify = true
    end

    it "should load all the sources defined in the Gemfile" do
      expect(cmd.gemfile.gemset).to receive(:sources).and_return(sources)
      expect(LogStash::PluginManager).to receive(:logstash_plugin?).with("dummy", nil, {:rubygems_source => sources}).and_return(true)
      cmd.execute
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
logstash-core-2.1.3-java spec/plugin_manager/install_spec.rb
logstash-core-2.1.2-java spec/plugin_manager/install_spec.rb
logstash-core-2.1.2.snapshot1-java spec/plugin_manager/install_spec.rb
logstash-core-2.1.1-java spec/plugin_manager/install_spec.rb
logstash-core-2.1.0-java spec/plugin_manager/install_spec.rb
logstash-core-2.1.0.snapshot4-java spec/plugin_manager/install_spec.rb
logstash-core-2.1.0.snapshot3-java spec/plugin_manager/install_spec.rb
logstash-core-2.1.0.snapshot2-java spec/plugin_manager/install_spec.rb