Sha256: 584f8d7b72dcf0215b6b942fd4043c9b21990899a1e01260317c45bbd7cfdea2
Contents?: true
Size: 681 Bytes
Versions: 2
Compression:
Stored size: 681 Bytes
Contents
# -*- encoding: utf-8 -*- require 'spec_helper' describe TTY::Plugins, '#find' do let(:object) { described_class } let(:tty_gem) { Gem::Specification.new('tty-console', '3.1.3')} let(:gem) { Gem::Specification.new('thor', '1.1.4') } let(:gems) { [gem, tty_gem] } before { Gem.stub(:refresh) Gem::Specification.stub(:each).and_yield(tty_gem).and_yield(gem) } subject { object.new } it 'inserts the tty gem only' do found = subject.find expect(found).to have(1).item expect(found.first.gem).to eql(tty_gem) end it 'retrieves only tty plugin' do subject.find expect(subject.names['console'].gem).to eql(tty_gem) end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
tty-0.0.11 | spec/tty/plugins/find_spec.rb |
tty-0.0.10 | spec/tty/plugins/find_spec.rb |