spec/acceptance_spec.rb in gemline-0.4.1 vs spec/acceptance_spec.rb in gemline-0.4.2
- old
+ new
@@ -1,20 +1,20 @@
require 'spec_helper'
require 'stringio'
describe "gemline output" do
- before 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') }
expect(@stdout.readlines.count).to eq(1)
end
it "should output nothing to STDOUT on error" do
- Kernel.stub(:exit)
+ allow(Kernel).to receive(:exit).and_return(true)
grab_io { Gemline.query('doesnotexist') }
expect(@stdout.readlines.count).to eq(0)
end
end