Sha256: 53b550f09d917321c8aa2d801881cc28b18d8723f6cdfdbcaf343d156b710cbc

Contents?: true

Size: 449 Bytes

Versions: 11

Compression:

Stored size: 449 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

describe TTY::Plugins, '#load' do
  let(:object)  { described_class }
  let(:plugin)  { double(:plugin, :enabled? => false) }
  let(:plugins) { [plugin, plugin]}

  subject { object.new }

  before { allow(subject).to receive(:plugins).and_return(plugins) }

  it "activates all plugins" do
    allow(plugin).to receive(:load!)
    subject.load
    expect(plugin).to have_received(:load!).twice()
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
tty-0.5.0 spec/tty/plugins/load_spec.rb
tty-0.4.0 spec/tty/plugins/load_spec.rb
tty-0.3.2 spec/tty/plugins/load_spec.rb
tty-0.3.1 spec/tty/plugins/load_spec.rb
tty-0.3.0 spec/tty/plugins/load_spec.rb
tty-0.2.1 spec/tty/plugins/load_spec.rb
tty-0.2.0 spec/tty/plugins/load_spec.rb
tty-0.1.3 spec/tty/plugins/load_spec.rb
tty-0.1.2 spec/tty/plugins/load_spec.rb
tty-0.1.1 spec/tty/plugins/load_spec.rb
tty-0.1.0 spec/tty/plugins/load_spec.rb