Assert that no warnings are emitted by Pry.

This commit is contained in:
Rob Gleeson 2011-06-05 23:41:59 +01:00
parent 3776baa326
commit 30d0b7b2f4
2 changed files with 10 additions and 0 deletions

View File

@ -4,6 +4,7 @@ unless Object.const_defined? 'Pry'
end
require 'bacon'
require 'open4'
# Ensure we do not execute any rc files
Pry::RC_FILES.clear

View File

@ -6,6 +6,15 @@ puts "With method_source version #{MethodSource::VERSION}"
puts "--"
describe Pry do
describe 'warning emissions' do
it 'should emit no warnings' do
Open4.popen4 'ruby -I lib -r"pry" -W -e "exit"' do |pid, stdin, stdout, stderr|
stderr.read.empty?.should == true
end
end
end
describe "open a Pry session on an object" do
describe "rep" do
before do