summaryrefslogtreecommitdiff
path: root/spec/commands/gem_list_spec.rb
blob: cef5c745d7376817fe6438a57fc0682489894f3e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
require_relative '../helper'

describe "gem-list" do
  it 'should not raise when invoked' do
    proc {
      pry_eval(self, 'gem-list')
    }.should.not.raise
  end

  it 'should work arglessly' do
    list = pry_eval('gem-list')
    list.should =~ /slop \(/
    list.should =~ /bacon \(/
  end

  it 'should find arg' do
    prylist = pry_eval('gem-list slop')
    prylist.should =~ /slop \(/
    prylist.should.not =~ /bacon/
  end

  it 'should return non-results as silence' do
    pry_eval('gem-list aoeuoueouaou').should.empty?
  end
end