Sha256: ddd9787ceacaf8e136f10042efa6f5d6690979436e12e1c0ae96dbeb8c4b2b05

Contents?: true

Size: 471 Bytes

Versions: 1

Compression:

Stored size: 471 Bytes

Contents

require 'spec_helper'
require 'stringio'

describe "gemline output" do

  before do     
    stub_rubygems_json_output
  end

  it "should output one line to STDOUT so the output can be appended to a Gemfile" do
    grab_io { Gemline.query('rails') }
    @stdout.readlines.count.should eq(1)
  end

  it "should output nothing to STDOUT on error" do
    Kernel.stub(:exit)
    grab_io { Gemline.query('doesnotexist') }
    @stdout.readlines.count.should eq(0)
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
gemline-0.1.3 spec/acceptance_spec.rb