Sha256: dfbeb8b8e0876a8414854b6d85f9bd48e2e9094a0faa6f1244f20446457e135c

Contents?: true

Size: 462 Bytes

Versions: 3

Compression:

Stored size: 462 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

describe TTY::Plugins, '#find' do
  it "finds gems with a specific prefix" do
    plugins = TTY::Plugins.new
    spec = Gem::Specification.load fixtures_path('foo-0.0.1.gemspec')
    allow(Gem::Specification).to receive(:find_by_name).with('tty').
      and_return(spec)

    plugins.find('tty')

    expect(plugins.to_a.map(&:name)).to eq([
      'tty-command',
      'tty-prompt',
      'tty-spinner'
    ])
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
tty-0.7.0 spec/tty/plugins/find_spec.rb
tty-0.6.1 spec/tty/plugins/find_spec.rb
tty-0.6.0 spec/tty/plugins/find_spec.rb