From e61354693ff411999af3f3a5e4a6ecd878139eac Mon Sep 17 00:00:00 2001 From: Kyrylo Silin Date: Sun, 18 Nov 2018 14:04:44 +0800 Subject: [PATCH] Add .rspec and require 'helper' from there Just discovered this nice feature of RSpec where it can load all files for us. Works with `bundle exec rake` and `bundle exec rspec spec/file_spec.rb`, which covers all use cases. --- .rspec | 2 ++ spec/cli_spec.rb | 2 -- spec/code_object_spec.rb | 2 -- spec/code_spec.rb | 2 -- spec/color_printer_spec.rb | 21 ++++++++++----------- spec/command_helpers_spec.rb | 2 -- spec/command_integration_spec.rb | 2 -- spec/command_set_spec.rb | 2 -- spec/command_spec.rb | 2 -- spec/commands/amend_line_spec.rb | 2 -- spec/commands/bang_spec.rb | 2 -- spec/commands/cat/file_formatter_spec.rb | 2 -- spec/commands/cat_spec.rb | 2 -- spec/commands/cd_spec.rb | 2 -- spec/commands/disable_pry_spec.rb | 2 -- spec/commands/edit_spec.rb | 1 - spec/commands/exit_all_spec.rb | 2 -- spec/commands/exit_program_spec.rb | 2 -- spec/commands/exit_spec.rb | 2 -- spec/commands/find_method_spec.rb | 2 -- spec/commands/gem_list_spec.rb | 2 -- spec/commands/gist_spec.rb | 3 --- spec/commands/help_spec.rb | 2 -- spec/commands/hist_spec.rb | 2 -- spec/commands/jump_to_spec.rb | 2 -- spec/commands/ls_spec.rb | 2 -- spec/commands/play_spec.rb | 3 --- spec/commands/raise_up_spec.rb | 2 -- spec/commands/reload_code_spec.rb | 2 -- spec/commands/ri_command_spec.rb | 1 - spec/commands/save_file_spec.rb | 2 -- spec/commands/shell_command_spec.rb | 2 -- spec/commands/show_doc_spec.rb | 1 - spec/commands/show_input_spec.rb | 2 -- spec/commands/show_source_spec.rb | 1 - spec/commands/watch_expression_spec.rb | 2 -- spec/commands/whereami_spec.rb | 2 -- spec/commands/wtf_spec.rb | 2 -- spec/completion_spec.rb | 1 - spec/config/behavior_spec.rb | 1 - spec/config/memoization_spec.rb | 1 - spec/config_spec.rb | 1 - spec/control_d_handler_spec.rb | 2 -- spec/documentation_helper_spec.rb | 2 -- spec/editor_spec.rb | 1 - spec/helpers/table_spec.rb | 2 -- spec/history_spec.rb | 1 - spec/hooks_spec.rb | 2 -- spec/indent_spec.rb | 4 +--- spec/integration/hanami_spec.rb | 1 - spec/integration/readline_spec.rb | 1 - spec/method/patcher_spec.rb | 2 -- spec/method_spec.rb | 1 - spec/pager_spec.rb | 1 - spec/prompt_spec.rb | 2 -- spec/pry_defaults_spec.rb | 2 -- spec/pry_output_spec.rb | 2 -- spec/pry_repl_spec.rb | 1 - spec/pry_spec.rb | 2 -- spec/pryrc_spec.rb | 2 -- spec/run_command_spec.rb | 2 -- spec/sticky_locals_spec.rb | 2 -- spec/syntax_checking_spec.rb | 2 -- spec/unrescued_exceptions_spec.rb | 2 -- spec/wrapped_module_spec.rb | 2 -- 65 files changed, 13 insertions(+), 125 deletions(-) create mode 100644 .rspec diff --git a/.rspec b/.rspec new file mode 100644 index 00000000..00b1a6b2 --- /dev/null +++ b/.rspec @@ -0,0 +1,2 @@ +--color +--require helper diff --git a/spec/cli_spec.rb b/spec/cli_spec.rb index 1d847349..aa3920a0 100644 --- a/spec/cli_spec.rb +++ b/spec/cli_spec.rb @@ -1,5 +1,3 @@ -require_relative 'helper' - describe Pry::Hooks do before do Pry::CLI.reset diff --git a/spec/code_object_spec.rb b/spec/code_object_spec.rb index 3878a826..50ce46ff 100644 --- a/spec/code_object_spec.rb +++ b/spec/code_object_spec.rb @@ -1,5 +1,3 @@ -require_relative 'helper' - describe Pry::CodeObject do describe "basic lookups" do before do diff --git a/spec/code_spec.rb b/spec/code_spec.rb index 00249dcf..06430634 100644 --- a/spec/code_spec.rb +++ b/spec/code_spec.rb @@ -1,5 +1,3 @@ -require_relative 'helper' - describe Pry::Code do describe '.from_file' do specify 'read lines from a file on disk' do diff --git a/spec/color_printer_spec.rb b/spec/color_printer_spec.rb index 0b1479f8..bf86daa1 100644 --- a/spec/color_printer_spec.rb +++ b/spec/color_printer_spec.rb @@ -1,9 +1,8 @@ -require 'helper' -describe Pry::ColorPrinter do +describe Pry::ColorPrinter do include Pry::Helpers::Text let(:io) { StringIO.new } let(:str) { strip_color(io.string.chomp) } - + describe '.pp' do describe 'Object' do it 'prints a string' do @@ -12,32 +11,32 @@ describe Pry::ColorPrinter do end end - describe 'Object subclass' do + describe 'Object subclass' do before do - class ObjectF < Object + class ObjectF < Object def inspect 'foo' end end class ObjectG < Object - def inspect - raise + def inspect + raise end end end - after do + after do Object.send :remove_const, :ObjectF Object.send :remove_const, :ObjectG - end + end it 'prints a string' do Pry::ColorPrinter.pp(ObjectF.new, io) expect(str).to eq('foo') - end + end - it 'prints a string, even when an exception is raised' do + it 'prints a string, even when an exception is raised' do Pry::ColorPrinter.pp(ObjectG.new, io) expect(str).to match(/\A#\z/) end diff --git a/spec/command_helpers_spec.rb b/spec/command_helpers_spec.rb index e039e405..902dacb8 100644 --- a/spec/command_helpers_spec.rb +++ b/spec/command_helpers_spec.rb @@ -1,5 +1,3 @@ -require_relative 'helper' - describe Pry::Helpers::CommandHelpers do before do @helper = Pry::Helpers::CommandHelpers diff --git a/spec/command_integration_spec.rb b/spec/command_integration_spec.rb index 2d926fdf..ef57f984 100644 --- a/spec/command_integration_spec.rb +++ b/spec/command_integration_spec.rb @@ -1,5 +1,3 @@ -require_relative 'helper' - describe "commands" do before do @str_output = StringIO.new diff --git a/spec/command_set_spec.rb b/spec/command_set_spec.rb index 0836728a..d37079ce 100644 --- a/spec/command_set_spec.rb +++ b/spec/command_set_spec.rb @@ -1,5 +1,3 @@ -require_relative 'helper' - describe Pry::CommandSet do before do @set = Pry::CommandSet.new do diff --git a/spec/command_spec.rb b/spec/command_spec.rb index 730c746c..9bc6cfc4 100644 --- a/spec/command_spec.rb +++ b/spec/command_spec.rb @@ -1,5 +1,3 @@ -require_relative 'helper' - describe "Pry::Command" do before do @set = Pry::CommandSet.new diff --git a/spec/commands/amend_line_spec.rb b/spec/commands/amend_line_spec.rb index 203b23d0..b133a61f 100644 --- a/spec/commands/amend_line_spec.rb +++ b/spec/commands/amend_line_spec.rb @@ -1,5 +1,3 @@ -require_relative '../helper' - describe "amend-line" do before do @t = pry_tester diff --git a/spec/commands/bang_spec.rb b/spec/commands/bang_spec.rb index 39ef2a08..d48bd6da 100644 --- a/spec/commands/bang_spec.rb +++ b/spec/commands/bang_spec.rb @@ -1,5 +1,3 @@ -require_relative '../helper' - describe "!" do before do @t = pry_tester diff --git a/spec/commands/cat/file_formatter_spec.rb b/spec/commands/cat/file_formatter_spec.rb index ad1a3eec..a255a54f 100644 --- a/spec/commands/cat/file_formatter_spec.rb +++ b/spec/commands/cat/file_formatter_spec.rb @@ -1,5 +1,3 @@ -require_relative '../../helper' - describe Pry::Command::Cat::FileFormatter do before do @p = Pry.new diff --git a/spec/commands/cat_spec.rb b/spec/commands/cat_spec.rb index c59eb501..813ff4a1 100644 --- a/spec/commands/cat_spec.rb +++ b/spec/commands/cat_spec.rb @@ -1,5 +1,3 @@ -require_relative '../helper' - describe "cat" do before do @str_output = StringIO.new diff --git a/spec/commands/cd_spec.rb b/spec/commands/cd_spec.rb index 0b17358b..1487c3d2 100644 --- a/spec/commands/cd_spec.rb +++ b/spec/commands/cd_spec.rb @@ -1,5 +1,3 @@ -require_relative '../helper' - describe 'cd' do before do @o, @obj = Object.new, Object.new diff --git a/spec/commands/disable_pry_spec.rb b/spec/commands/disable_pry_spec.rb index f9a02190..af5fa80a 100644 --- a/spec/commands/disable_pry_spec.rb +++ b/spec/commands/disable_pry_spec.rb @@ -1,5 +1,3 @@ -require_relative '../helper' - describe "disable-pry" do before do @t = pry_tester diff --git a/spec/commands/edit_spec.rb b/spec/commands/edit_spec.rb index 4b78a651..1b6f44d8 100644 --- a/spec/commands/edit_spec.rb +++ b/spec/commands/edit_spec.rb @@ -1,5 +1,4 @@ require 'pathname' -require_relative '../helper' describe "edit" do before do diff --git a/spec/commands/exit_all_spec.rb b/spec/commands/exit_all_spec.rb index 199dd7a9..640fa17f 100644 --- a/spec/commands/exit_all_spec.rb +++ b/spec/commands/exit_all_spec.rb @@ -1,5 +1,3 @@ -require_relative '../helper' - describe "exit-all" do before { @pry = Pry.new } diff --git a/spec/commands/exit_program_spec.rb b/spec/commands/exit_program_spec.rb index 7daeed0e..dcb2bb71 100644 --- a/spec/commands/exit_program_spec.rb +++ b/spec/commands/exit_program_spec.rb @@ -1,5 +1,3 @@ -require_relative '../helper' - describe "exit-program" do it 'should raise SystemExit' do expect { pry_eval('exit-program') }.to raise_error SystemExit diff --git a/spec/commands/exit_spec.rb b/spec/commands/exit_spec.rb index 206c1fd6..2b4da7e5 100644 --- a/spec/commands/exit_spec.rb +++ b/spec/commands/exit_spec.rb @@ -1,5 +1,3 @@ -require_relative '../helper' - describe "exit" do before { @pry = Pry.new(target: :outer, output: StringIO.new) } diff --git a/spec/commands/find_method_spec.rb b/spec/commands/find_method_spec.rb index 22610a06..f584f3b5 100644 --- a/spec/commands/find_method_spec.rb +++ b/spec/commands/find_method_spec.rb @@ -1,5 +1,3 @@ -require_relative '../helper' - describe "find-method" do MyKlass = Class.new do def hello diff --git a/spec/commands/gem_list_spec.rb b/spec/commands/gem_list_spec.rb index 06bd3444..4ffa0e05 100644 --- a/spec/commands/gem_list_spec.rb +++ b/spec/commands/gem_list_spec.rb @@ -1,5 +1,3 @@ -require_relative '../helper' - describe "gem-list" do it 'should not raise when invoked' do expect { pry_eval(self, 'gem-list') }.to_not raise_error diff --git a/spec/commands/gist_spec.rb b/spec/commands/gist_spec.rb index 09d1ffa9..da246391 100644 --- a/spec/commands/gist_spec.rb +++ b/spec/commands/gist_spec.rb @@ -1,9 +1,6 @@ # These tests are out of date. # They need to be updated for the new 'gist' API, but im too sleepy to # do that now. - -require_relative '../helper' - describe 'gist' do it 'has a dependency on the jist gem' do expect(Pry::Command::Gist.command_options[:requires_gem]).to eq("gist") diff --git a/spec/commands/help_spec.rb b/spec/commands/help_spec.rb index ba634a05..59e451c9 100644 --- a/spec/commands/help_spec.rb +++ b/spec/commands/help_spec.rb @@ -1,5 +1,3 @@ -require_relative '../helper' - describe "help" do before do @oldset = Pry.config.commands diff --git a/spec/commands/hist_spec.rb b/spec/commands/hist_spec.rb index 187ce15e..e9a0bec5 100644 --- a/spec/commands/hist_spec.rb +++ b/spec/commands/hist_spec.rb @@ -1,5 +1,3 @@ -require_relative '../helper' - describe "hist" do before do Pry.history.clear diff --git a/spec/commands/jump_to_spec.rb b/spec/commands/jump_to_spec.rb index 0b071d7b..7a06621e 100644 --- a/spec/commands/jump_to_spec.rb +++ b/spec/commands/jump_to_spec.rb @@ -1,5 +1,3 @@ -require 'helper' - RSpec.describe "jump-to" do let(:obj) { Object.new } diff --git a/spec/commands/ls_spec.rb b/spec/commands/ls_spec.rb index 30ddc99d..87eae6fb 100644 --- a/spec/commands/ls_spec.rb +++ b/spec/commands/ls_spec.rb @@ -1,5 +1,3 @@ -require_relative '../helper' - describe "ls" do describe "bug #1407" do it "behaves as usual when a method of the same name exists." do diff --git a/spec/commands/play_spec.rb b/spec/commands/play_spec.rb index b7ce31c3..6015efaf 100644 --- a/spec/commands/play_spec.rb +++ b/spec/commands/play_spec.rb @@ -1,9 +1,6 @@ # This command needs a TONNE more tests for it, but i can't figure out # how to do them yet, and i really want to release. Sorry. Someone # come along and do a better job. - -require_relative '../helper' - describe "play" do before do @o = Object.new diff --git a/spec/commands/raise_up_spec.rb b/spec/commands/raise_up_spec.rb index aacca03b..e7a5bdd7 100644 --- a/spec/commands/raise_up_spec.rb +++ b/spec/commands/raise_up_spec.rb @@ -1,5 +1,3 @@ -require_relative '../helper' - describe "raise-up" do before do @self = "Pad.self = self" diff --git a/spec/commands/reload_code_spec.rb b/spec/commands/reload_code_spec.rb index 7db8cc3f..3ee9d8d2 100644 --- a/spec/commands/reload_code_spec.rb +++ b/spec/commands/reload_code_spec.rb @@ -1,5 +1,3 @@ -require_relative '../helper' - describe "reload_code" do describe "reload_current_file" do it 'raises an error source code not found' do diff --git a/spec/commands/ri_command_spec.rb b/spec/commands/ri_command_spec.rb index 4368d615..dcad1dd2 100644 --- a/spec/commands/ri_command_spec.rb +++ b/spec/commands/ri_command_spec.rb @@ -1,4 +1,3 @@ -require_relative '../helper' describe "ri" do it "prints an error message without an argument" do expect(pry_eval("ri")).to include("Please provide a class, module, or method name (e.g: ri Array#push)") diff --git a/spec/commands/save_file_spec.rb b/spec/commands/save_file_spec.rb index 0a30284b..f04953e3 100644 --- a/spec/commands/save_file_spec.rb +++ b/spec/commands/save_file_spec.rb @@ -1,5 +1,3 @@ -require_relative '../helper' - describe "save-file" do before do @tf = Tempfile.new(["pry", ".py"]) diff --git a/spec/commands/shell_command_spec.rb b/spec/commands/shell_command_spec.rb index b58f039e..3392efb8 100644 --- a/spec/commands/shell_command_spec.rb +++ b/spec/commands/shell_command_spec.rb @@ -1,5 +1,3 @@ -require_relative '../helper' - describe Pry::Command::ShellCommand do describe 'cd' do before do diff --git a/spec/commands/show_doc_spec.rb b/spec/commands/show_doc_spec.rb index f4b836f6..2266f06a 100644 --- a/spec/commands/show_doc_spec.rb +++ b/spec/commands/show_doc_spec.rb @@ -1,4 +1,3 @@ -require_relative '../helper' require "fixtures/show_source_doc_examples" describe "show-doc" do diff --git a/spec/commands/show_input_spec.rb b/spec/commands/show_input_spec.rb index 0100444a..8fc82b3a 100644 --- a/spec/commands/show_input_spec.rb +++ b/spec/commands/show_input_spec.rb @@ -1,5 +1,3 @@ -require_relative '../helper' - describe "show-input" do before do @t = pry_tester diff --git a/spec/commands/show_source_spec.rb b/spec/commands/show_source_spec.rb index a4a9d7f2..8de5538b 100644 --- a/spec/commands/show_source_spec.rb +++ b/spec/commands/show_source_spec.rb @@ -1,4 +1,3 @@ -require_relative '../helper' require "fixtures/show_source_doc_examples" describe "show-source" do diff --git a/spec/commands/watch_expression_spec.rb b/spec/commands/watch_expression_spec.rb index 6fac3206..5b2692aa 100644 --- a/spec/commands/watch_expression_spec.rb +++ b/spec/commands/watch_expression_spec.rb @@ -1,5 +1,3 @@ -require_relative '../helper' - describe "watch expression" do # Custom eval that will: # 1) Create an instance of pry that can use for multiple calls diff --git a/spec/commands/whereami_spec.rb b/spec/commands/whereami_spec.rb index 2ed626b8..fbc9c90e 100644 --- a/spec/commands/whereami_spec.rb +++ b/spec/commands/whereami_spec.rb @@ -1,5 +1,3 @@ -require_relative '../helper' - describe "whereami" do it 'should work with methods that have been undefined' do class Cor diff --git a/spec/commands/wtf_spec.rb b/spec/commands/wtf_spec.rb index ee77906a..118046e7 100644 --- a/spec/commands/wtf_spec.rb +++ b/spec/commands/wtf_spec.rb @@ -1,5 +1,3 @@ -require_relative '../helper' - describe "wtf?!" do let(:tester) do pry_tester do diff --git a/spec/completion_spec.rb b/spec/completion_spec.rb index 37b50507..dc0a8c51 100644 --- a/spec/completion_spec.rb +++ b/spec/completion_spec.rb @@ -1,4 +1,3 @@ -require_relative 'helper' require "readline" unless defined?(Readline) require "pry/input_completer" diff --git a/spec/config/behavior_spec.rb b/spec/config/behavior_spec.rb index a6d46c8e..9a789a16 100644 --- a/spec/config/behavior_spec.rb +++ b/spec/config/behavior_spec.rb @@ -1,4 +1,3 @@ -require 'helper' RSpec.describe Pry::Config::Behavior do let(:behavior) do Class.new do diff --git a/spec/config/memoization_spec.rb b/spec/config/memoization_spec.rb index a424a563..59a3353e 100644 --- a/spec/config/memoization_spec.rb +++ b/spec/config/memoization_spec.rb @@ -1,4 +1,3 @@ -require 'helper' RSpec.describe Pry::Config::Memoization do let(:config) do Class.new do diff --git a/spec/config_spec.rb b/spec/config_spec.rb index b6b62bba..8f2861f1 100644 --- a/spec/config_spec.rb +++ b/spec/config_spec.rb @@ -1,4 +1,3 @@ -require_relative 'helper' describe Pry::Config do describe "bug #1552" do specify "a local key has precendence over its default when the stored value is false" do diff --git a/spec/control_d_handler_spec.rb b/spec/control_d_handler_spec.rb index 8b2dea06..9e0ddc8c 100644 --- a/spec/control_d_handler_spec.rb +++ b/spec/control_d_handler_spec.rb @@ -1,5 +1,3 @@ -require_relative 'helper' - describe Pry::DEFAULT_CONTROL_D_HANDLER do describe "control-d press" do before do diff --git a/spec/documentation_helper_spec.rb b/spec/documentation_helper_spec.rb index 97608b06..8a709514 100644 --- a/spec/documentation_helper_spec.rb +++ b/spec/documentation_helper_spec.rb @@ -1,5 +1,3 @@ -require_relative 'helper' - describe Pry::Helpers::DocumentationHelpers do before do @helper = Pry::Helpers::DocumentationHelpers diff --git a/spec/editor_spec.rb b/spec/editor_spec.rb index 9ba7992e..007a740c 100644 --- a/spec/editor_spec.rb +++ b/spec/editor_spec.rb @@ -1,5 +1,4 @@ require 'pathname' -require_relative 'helper' describe Pry::Editor do class Pry::Editor diff --git a/spec/helpers/table_spec.rb b/spec/helpers/table_spec.rb index 6e827593..b49a2ee4 100644 --- a/spec/helpers/table_spec.rb +++ b/spec/helpers/table_spec.rb @@ -1,5 +1,3 @@ -require_relative '../helper' - describe 'Formatting Table' do it 'knows about colorized fitting' do t = Pry::Helpers::Table.new %w(hihi), column_count: 1 diff --git a/spec/history_spec.rb b/spec/history_spec.rb index cd60d2dd..afa4a800 100644 --- a/spec/history_spec.rb +++ b/spec/history_spec.rb @@ -1,4 +1,3 @@ -require_relative 'helper' require 'tempfile' describe Pry do diff --git a/spec/hooks_spec.rb b/spec/hooks_spec.rb index 5a73feac..114de49e 100644 --- a/spec/hooks_spec.rb +++ b/spec/hooks_spec.rb @@ -1,5 +1,3 @@ -require_relative 'helper' - describe Pry::Hooks do before do @hooks = Pry::Hooks.new diff --git a/spec/indent_spec.rb b/spec/indent_spec.rb index 9e927ccb..4eddde91 100644 --- a/spec/indent_spec.rb +++ b/spec/indent_spec.rb @@ -1,5 +1,3 @@ -require_relative 'helper' - # Please keep in mind that any hash signs ("#") in the heredoc strings are # placed on purpose. Without these editors might remove the whitespace on empty # lines. @@ -249,7 +247,7 @@ def test puts "something" rescue "whatever" end INPUT - + expect(@indent.indent(input)).to eq input end diff --git a/spec/integration/hanami_spec.rb b/spec/integration/hanami_spec.rb index 17e68429..a3dd2575 100644 --- a/spec/integration/hanami_spec.rb +++ b/spec/integration/hanami_spec.rb @@ -1,4 +1,3 @@ -require "helper" require "shellwords" RSpec.describe "Hanami integration" do diff --git a/spec/integration/readline_spec.rb b/spec/integration/readline_spec.rb index 72e5c119..0d0af973 100644 --- a/spec/integration/readline_spec.rb +++ b/spec/integration/readline_spec.rb @@ -1,7 +1,6 @@ # These specs ensure that Pry doesn't require readline until the first time a # REPL is started. -require "helper" require "shellwords" RSpec.describe "Readline" do diff --git a/spec/method/patcher_spec.rb b/spec/method/patcher_spec.rb index 3cfe7520..dc6178ad 100644 --- a/spec/method/patcher_spec.rb +++ b/spec/method/patcher_spec.rb @@ -1,5 +1,3 @@ -require_relative '../helper' - describe Pry::Method::Patcher do before do @x = Object.new diff --git a/spec/method_spec.rb b/spec/method_spec.rb index 92216635..7e517687 100644 --- a/spec/method_spec.rb +++ b/spec/method_spec.rb @@ -1,4 +1,3 @@ -require_relative 'helper' require 'set' describe Pry::Method do diff --git a/spec/pager_spec.rb b/spec/pager_spec.rb index 919826f9..69c61b49 100644 --- a/spec/pager_spec.rb +++ b/spec/pager_spec.rb @@ -1,4 +1,3 @@ -require_relative "helper" describe "Pry::Pager" do describe "PageTracker" do before do diff --git a/spec/prompt_spec.rb b/spec/prompt_spec.rb index 80c9631b..9e57045f 100644 --- a/spec/prompt_spec.rb +++ b/spec/prompt_spec.rb @@ -1,5 +1,3 @@ -require_relative 'helper' - describe Pry::Prompt do describe ".[]" do it "accesses prompts" do diff --git a/spec/pry_defaults_spec.rb b/spec/pry_defaults_spec.rb index faf88745..b5157db9 100644 --- a/spec/pry_defaults_spec.rb +++ b/spec/pry_defaults_spec.rb @@ -1,5 +1,3 @@ -require_relative 'helper' - _version = 1 describe "test Pry defaults" do diff --git a/spec/pry_output_spec.rb b/spec/pry_output_spec.rb index b200adf7..8312012c 100644 --- a/spec/pry_output_spec.rb +++ b/spec/pry_output_spec.rb @@ -1,5 +1,3 @@ -require_relative 'helper' - describe Pry do describe "output failsafe" do after do diff --git a/spec/pry_repl_spec.rb b/spec/pry_repl_spec.rb index a38fdfd1..c6c6a2cd 100644 --- a/spec/pry_repl_spec.rb +++ b/spec/pry_repl_spec.rb @@ -1,4 +1,3 @@ -require_relative 'helper' describe Pry::REPL do it "should let you run commands in the middle of multiline expressions" do ReplTester.start do diff --git a/spec/pry_spec.rb b/spec/pry_spec.rb index 7ae5e826..d109d426 100644 --- a/spec/pry_spec.rb +++ b/spec/pry_spec.rb @@ -1,5 +1,3 @@ -require_relative 'helper' - describe Pry do before do @str_output = StringIO.new diff --git a/spec/pryrc_spec.rb b/spec/pryrc_spec.rb index 2a2613b4..eb086a2c 100644 --- a/spec/pryrc_spec.rb +++ b/spec/pryrc_spec.rb @@ -1,5 +1,3 @@ -require_relative 'helper' - describe Pry do describe 'loading rc files' do before do diff --git a/spec/run_command_spec.rb b/spec/run_command_spec.rb index 00c2867e..af81d96a 100644 --- a/spec/run_command_spec.rb +++ b/spec/run_command_spec.rb @@ -1,5 +1,3 @@ -require_relative 'helper' - describe "Pry.run_command" do before do o = Object.new diff --git a/spec/sticky_locals_spec.rb b/spec/sticky_locals_spec.rb index 9418a09f..895a7cbf 100644 --- a/spec/sticky_locals_spec.rb +++ b/spec/sticky_locals_spec.rb @@ -1,5 +1,3 @@ -require_relative 'helper' - describe "Sticky locals (_file_ and friends)" do it 'locals should all exist upon initialization' do expect { pry_eval '_file_', '_dir_', '_ex_', '_pry_', '_' }.to_not raise_error diff --git a/spec/syntax_checking_spec.rb b/spec/syntax_checking_spec.rb index 5a3e7ef7..c57c9ae0 100644 --- a/spec/syntax_checking_spec.rb +++ b/spec/syntax_checking_spec.rb @@ -1,5 +1,3 @@ -require_relative 'helper' - describe Pry do before do @str_output = StringIO.new diff --git a/spec/unrescued_exceptions_spec.rb b/spec/unrescued_exceptions_spec.rb index 49a12c96..b72b75c4 100644 --- a/spec/unrescued_exceptions_spec.rb +++ b/spec/unrescued_exceptions_spec.rb @@ -1,5 +1,3 @@ -require_relative 'helper' - describe "Pry.config.unrescued_exceptions" do before do @str_output = StringIO.new diff --git a/spec/wrapped_module_spec.rb b/spec/wrapped_module_spec.rb index e0520dc4..abe12c6a 100644 --- a/spec/wrapped_module_spec.rb +++ b/spec/wrapped_module_spec.rb @@ -1,5 +1,3 @@ -require_relative 'helper' - describe Pry::WrappedModule do describe "#initialize" do it "should raise an exception when a non-module is passed" do