diff --git a/test/helper.rb b/test/helper.rb index 237e5ec8..9ff54c3d 100644 --- a/test/helper.rb +++ b/test/helper.rb @@ -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 diff --git a/test/test_pry.rb b/test/test_pry.rb index 9413f4c7..aaa9b87c 100644 --- a/test/test_pry.rb +++ b/test/test_pry.rb @@ -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