summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorKyrylo Silin <silin@kyrylo.org>2019-05-03 01:33:56 +0300
committerKyrylo Silin <silin@kyrylo.org>2019-05-08 00:13:17 +0300
commit18c45d26c55a659461c13a5f423f1a5094a74571 (patch)
tree307045d706948d9edef92376f4335419cfc07a97 /spec
parentfc3526d1393de4a0e4102099a3153311dff44be6 (diff)
downloadpry-18c45d26c55a659461c13a5f423f1a5094a74571.tar.gz
rubocop: enable the Style/FrozenStringLiteralComment cop
This will greatly ease Pry support on Ruby 3.0 (when it's out).
Diffstat (limited to 'spec')
-rw-r--r--spec/block_command_spec.rb2
-rw-r--r--spec/class_command_spec.rb2
-rw-r--r--spec/cli_spec.rb2
-rw-r--r--spec/code_object_spec.rb2
-rw-r--r--spec/code_spec.rb2
-rw-r--r--spec/color_printer_spec.rb2
-rw-r--r--spec/command_integration_spec.rb2
-rw-r--r--spec/command_set_spec.rb2
-rw-r--r--spec/command_spec.rb2
-rw-r--r--spec/command_state_spec.rb2
-rw-r--r--spec/commands/amend_line_spec.rb2
-rw-r--r--spec/commands/bang_spec.rb2
-rw-r--r--spec/commands/cat/file_formatter_spec.rb2
-rw-r--r--spec/commands/cat_spec.rb2
-rw-r--r--spec/commands/cd_spec.rb2
-rw-r--r--spec/commands/clear_screen_spec.rb2
-rw-r--r--spec/commands/disable_pry_spec.rb2
-rw-r--r--spec/commands/edit_spec.rb2
-rw-r--r--spec/commands/exit_all_spec.rb2
-rw-r--r--spec/commands/exit_program_spec.rb2
-rw-r--r--spec/commands/exit_spec.rb2
-rw-r--r--spec/commands/find_method_spec.rb2
-rw-r--r--spec/commands/help_spec.rb2
-rw-r--r--spec/commands/hist_spec.rb2
-rw-r--r--spec/commands/jump_to_spec.rb2
-rw-r--r--spec/commands/ls_spec.rb2
-rw-r--r--spec/commands/play_spec.rb2
-rw-r--r--spec/commands/raise_up_spec.rb2
-rw-r--r--spec/commands/reload_code_spec.rb2
-rw-r--r--spec/commands/ri_command_spec.rb2
-rw-r--r--spec/commands/save_file_spec.rb2
-rw-r--r--spec/commands/shell_command_spec.rb2
-rw-r--r--spec/commands/show_doc_spec.rb2
-rw-r--r--spec/commands/show_input_spec.rb2
-rw-r--r--spec/commands/show_source_spec.rb2
-rw-r--r--spec/commands/watch_expression_spec.rb2
-rw-r--r--spec/commands/whereami_spec.rb2
-rw-r--r--spec/commands/wtf_spec.rb2
-rw-r--r--spec/completion_spec.rb2
-rw-r--r--spec/config/attributable_spec.rb2
-rw-r--r--spec/config/lazy_value_spec.rb2
-rw-r--r--spec/config/memoized_value_spec.rb2
-rw-r--r--spec/config/value_spec.rb2
-rw-r--r--spec/config_spec.rb2
-rw-r--r--spec/control_d_handler_spec.rb2
-rw-r--r--spec/documentation_helper_spec.rb2
-rw-r--r--spec/editor_spec.rb2
-rw-r--r--spec/exception_handler_spec.rb2
-rw-r--r--spec/fixtures/Gemfile2
-rw-r--r--spec/fixtures/candidate_helper1.rb2
-rw-r--r--spec/fixtures/candidate_helper2.rb2
-rw-r--r--spec/fixtures/show_source_doc_examples.rb2
-rw-r--r--spec/fixtures/whereami_helper.rb2
-rw-r--r--spec/helpers/command_helpers_spec.rb2
-rw-r--r--spec/helpers/table_spec.rb2
-rw-r--r--spec/history_spec.rb2
-rw-r--r--spec/hooks_spec.rb2
-rw-r--r--spec/indent_spec.rb2
-rw-r--r--spec/integration/bundler_spec.rb2
-rw-r--r--spec/integration/cli_spec.rb2
-rw-r--r--spec/integration/hanami_spec.rb2
-rw-r--r--spec/integration/readline_spec.rb2
-rw-r--r--spec/method/patcher_spec.rb2
-rw-r--r--spec/method_spec.rb2
-rw-r--r--spec/pager_spec.rb2
-rw-r--r--spec/prompt_spec.rb2
-rw-r--r--spec/pry_defaults_spec.rb2
-rw-r--r--spec/pry_output_spec.rb2
-rw-r--r--spec/pry_repl_spec.rb2
-rw-r--r--spec/pry_spec.rb2
-rw-r--r--spec/pryrc_spec.rb2
-rw-r--r--spec/ring_spec.rb2
-rw-r--r--spec/run_command_spec.rb2
-rw-r--r--spec/spec_helper.rb2
-rw-r--r--spec/sticky_locals_spec.rb2
-rw-r--r--spec/support/mock_pry.rb2
-rw-r--r--spec/support/repl_tester.rb2
-rw-r--r--spec/syntax_checking_spec.rb2
-rw-r--r--spec/system_command_handler_spec.rb2
-rw-r--r--spec/unrescued_exceptions_spec.rb2
-rw-r--r--spec/warning_spec.rb2
-rw-r--r--spec/wrapped_module_spec.rb2
82 files changed, 164 insertions, 0 deletions
diff --git a/spec/block_command_spec.rb b/spec/block_command_spec.rb
index 1a57e96a..915cbe58 100644
--- a/spec/block_command_spec.rb
+++ b/spec/block_command_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
RSpec.describe Pry::BlockCommand do
subject { Class.new(described_class).new }
diff --git a/spec/class_command_spec.rb b/spec/class_command_spec.rb
index 8d7d7484..59151d62 100644
--- a/spec/class_command_spec.rb
+++ b/spec/class_command_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
RSpec.describe Pry::ClassCommand do
describe ".inherited" do
context "when match is defined" do
diff --git a/spec/cli_spec.rb b/spec/cli_spec.rb
index b9c8ee46..93625f79 100644
--- a/spec/cli_spec.rb
+++ b/spec/cli_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
RSpec.describe Pry::CLI do
before { described_class.reset }
diff --git a/spec/code_object_spec.rb b/spec/code_object_spec.rb
index 8cee8b66..ef670e00 100644
--- a/spec/code_object_spec.rb
+++ b/spec/code_object_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
RSpec.describe Pry::CodeObject do
let(:pry) do
Pry.new.tap { |p| p.binding_stack = [binding] }
diff --git a/spec/code_spec.rb b/spec/code_spec.rb
index 0d2c2d4d..4ae2ca0b 100644
--- a/spec/code_spec.rb
+++ b/spec/code_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'method_source'
require 'tempfile'
diff --git a/spec/color_printer_spec.rb b/spec/color_printer_spec.rb
index 8347a348..3c9048ec 100644
--- a/spec/color_printer_spec.rb
+++ b/spec/color_printer_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
RSpec.describe Pry::ColorPrinter do
let(:output) { StringIO.new }
diff --git a/spec/command_integration_spec.rb b/spec/command_integration_spec.rb
index 98e799a4..c1b63052 100644
--- a/spec/command_integration_spec.rb
+++ b/spec/command_integration_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe "commands" do
before do
@str_output = StringIO.new
diff --git a/spec/command_set_spec.rb b/spec/command_set_spec.rb
index 1cc381d6..fc67d140 100644
--- a/spec/command_set_spec.rb
+++ b/spec/command_set_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
RSpec.describe Pry::CommandSet do
let(:set) do
Pry::CommandSet.new { import(Pry::Commands) }
diff --git a/spec/command_spec.rb b/spec/command_spec.rb
index 56ee27b3..b676be81 100644
--- a/spec/command_spec.rb
+++ b/spec/command_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'stringio'
RSpec.describe Pry::Command do
diff --git a/spec/command_state_spec.rb b/spec/command_state_spec.rb
index 10097b2b..264b772c 100644
--- a/spec/command_state_spec.rb
+++ b/spec/command_state_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
RSpec.describe Pry::CommandState do
describe ".default" do
it "returns the default command state" do
diff --git a/spec/commands/amend_line_spec.rb b/spec/commands/amend_line_spec.rb
index 29b68f80..edf50f23 100644
--- a/spec/commands/amend_line_spec.rb
+++ b/spec/commands/amend_line_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe "amend-line" do
before do
@t = pry_tester
diff --git a/spec/commands/bang_spec.rb b/spec/commands/bang_spec.rb
index d48bd6da..e07964ec 100644
--- a/spec/commands/bang_spec.rb
+++ b/spec/commands/bang_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
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 a255a54f..4360f071 100644
--- a/spec/commands/cat/file_formatter_spec.rb
+++ b/spec/commands/cat/file_formatter_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
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 a2c3ecba..8ed3ed8a 100644
--- a/spec/commands/cat_spec.rb
+++ b/spec/commands/cat_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'tempfile'
describe "cat" do
diff --git a/spec/commands/cd_spec.rb b/spec/commands/cd_spec.rb
index 5ea64861..9777bddb 100644
--- a/spec/commands/cd_spec.rb
+++ b/spec/commands/cd_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe 'cd' do
before do
@o = Object.new
diff --git a/spec/commands/clear_screen_spec.rb b/spec/commands/clear_screen_spec.rb
index 152201d2..663e3717 100644
--- a/spec/commands/clear_screen_spec.rb
+++ b/spec/commands/clear_screen_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
RSpec.describe "clear-screen" do
before do
@t = pry_tester
diff --git a/spec/commands/disable_pry_spec.rb b/spec/commands/disable_pry_spec.rb
index af5fa80a..db90a5cc 100644
--- a/spec/commands/disable_pry_spec.rb
+++ b/spec/commands/disable_pry_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe "disable-pry" do
before do
@t = pry_tester
diff --git a/spec/commands/edit_spec.rb b/spec/commands/edit_spec.rb
index cc741053..925a9425 100644
--- a/spec/commands/edit_spec.rb
+++ b/spec/commands/edit_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'pathname'
require 'tempfile'
diff --git a/spec/commands/exit_all_spec.rb b/spec/commands/exit_all_spec.rb
index 640fa17f..aa3c705b 100644
--- a/spec/commands/exit_all_spec.rb
+++ b/spec/commands/exit_all_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
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 dcb2bb71..58bda763 100644
--- a/spec/commands/exit_program_spec.rb
+++ b/spec/commands/exit_program_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
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 2b4da7e5..3bbf5f5c 100644
--- a/spec/commands/exit_spec.rb
+++ b/spec/commands/exit_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
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 f584f3b5..7be22752 100644
--- a/spec/commands/find_method_spec.rb
+++ b/spec/commands/find_method_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe "find-method" do
MyKlass = Class.new do
def hello
diff --git a/spec/commands/help_spec.rb b/spec/commands/help_spec.rb
index 59e451c9..0e748a00 100644
--- a/spec/commands/help_spec.rb
+++ b/spec/commands/help_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe "help" do
before do
@oldset = Pry.config.commands
diff --git a/spec/commands/hist_spec.rb b/spec/commands/hist_spec.rb
index 558b4f99..2fbbffb6 100644
--- a/spec/commands/hist_spec.rb
+++ b/spec/commands/hist_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
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 48c82f5f..c8f8f5c7 100644
--- a/spec/commands/jump_to_spec.rb
+++ b/spec/commands/jump_to_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
RSpec.describe "jump-to" do
let(:obj) { Object.new }
diff --git a/spec/commands/ls_spec.rb b/spec/commands/ls_spec.rb
index e147f726..f3ef8f9b 100644
--- a/spec/commands/ls_spec.rb
+++ b/spec/commands/ls_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
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 f82bc645..000f6fe5 100644
--- a/spec/commands/play_spec.rb
+++ b/spec/commands/play_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# 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.
diff --git a/spec/commands/raise_up_spec.rb b/spec/commands/raise_up_spec.rb
index 39b2f127..dbb45f91 100644
--- a/spec/commands/raise_up_spec.rb
+++ b/spec/commands/raise_up_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
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 b7fe743f..845ee117 100644
--- a/spec/commands/reload_code_spec.rb
+++ b/spec/commands/reload_code_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
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 9fc4468a..0429019d 100644
--- a/spec/commands/ri_command_spec.rb
+++ b/spec/commands/ri_command_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe "ri" do
it "prints an error message without an argument" do
expect(pry_eval("ri")).to include(
diff --git a/spec/commands/save_file_spec.rb b/spec/commands/save_file_spec.rb
index 902ac926..9dd80966 100644
--- a/spec/commands/save_file_spec.rb
+++ b/spec/commands/save_file_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'tempfile'
describe "save-file" do
diff --git a/spec/commands/shell_command_spec.rb b/spec/commands/shell_command_spec.rb
index 62526b3c..f66207b4 100644
--- a/spec/commands/shell_command_spec.rb
+++ b/spec/commands/shell_command_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
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 e0bba4da..67ce1bc9 100644
--- a/spec/commands/show_doc_spec.rb
+++ b/spec/commands/show_doc_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
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 8fc82b3a..3953dbf3 100644
--- a/spec/commands/show_input_spec.rb
+++ b/spec/commands/show_input_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
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 13bb86e9..fc921a9d 100644
--- a/spec/commands/show_source_spec.rb
+++ b/spec/commands/show_source_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
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 04f26d10..08f3d107 100644
--- a/spec/commands/watch_expression_spec.rb
+++ b/spec/commands/watch_expression_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
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 1ccac2ef..aff868ce 100644
--- a/spec/commands/whereami_spec.rb
+++ b/spec/commands/whereami_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'method_source'
describe "whereami" do
diff --git a/spec/commands/wtf_spec.rb b/spec/commands/wtf_spec.rb
index 0a224fa5..ace8cbf3 100644
--- a/spec/commands/wtf_spec.rb
+++ b/spec/commands/wtf_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe "wtf?!" do
let(:tester) do
pry_tester do
diff --git a/spec/completion_spec.rb b/spec/completion_spec.rb
index 4216ea74..5df577f5 100644
--- a/spec/completion_spec.rb
+++ b/spec/completion_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require "readline" unless defined?(Readline)
require "pry/input_completer"
diff --git a/spec/config/attributable_spec.rb b/spec/config/attributable_spec.rb
index c0c2b167..9b6ea561 100644
--- a/spec/config/attributable_spec.rb
+++ b/spec/config/attributable_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
RSpec.describe Pry::Config::Attributable do
subject { klass.new }
diff --git a/spec/config/lazy_value_spec.rb b/spec/config/lazy_value_spec.rb
index dc2aaa1e..7b9f28f3 100644
--- a/spec/config/lazy_value_spec.rb
+++ b/spec/config/lazy_value_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
RSpec.describe Pry::Config::LazyValue do
describe "#call" do
subject { described_class.new { rand } }
diff --git a/spec/config/memoized_value_spec.rb b/spec/config/memoized_value_spec.rb
index 1601bff2..22e278dc 100644
--- a/spec/config/memoized_value_spec.rb
+++ b/spec/config/memoized_value_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
RSpec.describe Pry::Config::MemoizedValue do
describe "#call" do
subject { described_class.new { rand } }
diff --git a/spec/config/value_spec.rb b/spec/config/value_spec.rb
index efb8eca4..7ddd0151 100644
--- a/spec/config/value_spec.rb
+++ b/spec/config/value_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
RSpec.describe Pry::Config::Value do
describe "#call" do
context "when given value is a MemoizedValue" do
diff --git a/spec/config_spec.rb b/spec/config_spec.rb
index 13aa52aa..d42d4d1e 100644
--- a/spec/config_spec.rb
+++ b/spec/config_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
RSpec.describe Pry::Config do
specify { expect(subject.input).to respond_to(:readline) }
specify { expect(subject.output).to be_an(IO) }
diff --git a/spec/control_d_handler_spec.rb b/spec/control_d_handler_spec.rb
index 030cefd6..1306bdc3 100644
--- a/spec/control_d_handler_spec.rb
+++ b/spec/control_d_handler_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
RSpec.describe Pry::ControlDHandler do
context "when given eval string is non-empty" do
let(:pry_instance) do
diff --git a/spec/documentation_helper_spec.rb b/spec/documentation_helper_spec.rb
index c6395774..8da62a29 100644
--- a/spec/documentation_helper_spec.rb
+++ b/spec/documentation_helper_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe Pry::Helpers::DocumentationHelpers do
before do
@helper = Pry::Helpers::DocumentationHelpers
diff --git a/spec/editor_spec.rb b/spec/editor_spec.rb
index ea4c31d7..3410cbe7 100644
--- a/spec/editor_spec.rb
+++ b/spec/editor_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'pathname'
describe Pry::Editor do
diff --git a/spec/exception_handler_spec.rb b/spec/exception_handler_spec.rb
index 62138153..b1608509 100644
--- a/spec/exception_handler_spec.rb
+++ b/spec/exception_handler_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
RSpec.describe Pry::ExceptionHandler do
describe ".handle_exception" do
let(:output) { StringIO.new }
diff --git a/spec/fixtures/Gemfile b/spec/fixtures/Gemfile
index 20b4d4ae..ebc45888 100644
--- a/spec/fixtures/Gemfile
+++ b/spec/fixtures/Gemfile
@@ -1 +1,3 @@
+# frozen_string_literal: true
+
source 'https://rubygems.org'
diff --git a/spec/fixtures/candidate_helper1.rb b/spec/fixtures/candidate_helper1.rb
index 7833d52f..ec431807 100644
--- a/spec/fixtures/candidate_helper1.rb
+++ b/spec/fixtures/candidate_helper1.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# rank 0
class CandidateTest
def test1; end
diff --git a/spec/fixtures/candidate_helper2.rb b/spec/fixtures/candidate_helper2.rb
index 9de72c8d..06bb0475 100644
--- a/spec/fixtures/candidate_helper2.rb
+++ b/spec/fixtures/candidate_helper2.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# rank 1
class CandidateTest
def test4; end
diff --git a/spec/fixtures/show_source_doc_examples.rb b/spec/fixtures/show_source_doc_examples.rb
index bb24960c..dad53e06 100644
--- a/spec/fixtures/show_source_doc_examples.rb
+++ b/spec/fixtures/show_source_doc_examples.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# used by show_source_spec.rb and show_doc_spec.rb
class TestClassForShowSource
# doc
diff --git a/spec/fixtures/whereami_helper.rb b/spec/fixtures/whereami_helper.rb
index 6aea145e..be6d28bb 100644
--- a/spec/fixtures/whereami_helper.rb
+++ b/spec/fixtures/whereami_helper.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# rubocop:disable Layout/EmptyLineBetweenDefs
class Cor
def a; end
diff --git a/spec/helpers/command_helpers_spec.rb b/spec/helpers/command_helpers_spec.rb
index 0e696cc5..7cc8f53d 100644
--- a/spec/helpers/command_helpers_spec.rb
+++ b/spec/helpers/command_helpers_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
RSpec.describe Pry::Helpers::CommandHelpers do
describe "#temp_file" do
it "yields a tempfile" do
diff --git a/spec/helpers/table_spec.rb b/spec/helpers/table_spec.rb
index 8aceac9c..66b3acfa 100644
--- a/spec/helpers/table_spec.rb
+++ b/spec/helpers/table_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
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 43bf55a2..32eadfb3 100644
--- a/spec/history_spec.rb
+++ b/spec/history_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'tempfile'
require 'rbconfig'
diff --git a/spec/hooks_spec.rb b/spec/hooks_spec.rb
index 465ed236..0b8d6f9c 100644
--- a/spec/hooks_spec.rb
+++ b/spec/hooks_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe Pry::Hooks do
before do
@hooks = Pry::Hooks.new
diff --git a/spec/indent_spec.rb b/spec/indent_spec.rb
index 24017441..aa48379f 100644
--- a/spec/indent_spec.rb
+++ b/spec/indent_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# 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.
diff --git a/spec/integration/bundler_spec.rb b/spec/integration/bundler_spec.rb
index 7b98822b..3e8d146f 100644
--- a/spec/integration/bundler_spec.rb
+++ b/spec/integration/bundler_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rbconfig'
RSpec.describe 'Bundler' do
diff --git a/spec/integration/cli_spec.rb b/spec/integration/cli_spec.rb
index 306dcd38..0ea2a12a 100644
--- a/spec/integration/cli_spec.rb
+++ b/spec/integration/cli_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rbconfig'
RSpec.describe 'The bin/pry CLI' do
diff --git a/spec/integration/hanami_spec.rb b/spec/integration/hanami_spec.rb
index 1541a623..5fae6ef8 100644
--- a/spec/integration/hanami_spec.rb
+++ b/spec/integration/hanami_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require "shellwords"
require 'rbconfig'
diff --git a/spec/integration/readline_spec.rb b/spec/integration/readline_spec.rb
index 1407ca57..aaec5d5e 100644
--- a/spec/integration/readline_spec.rb
+++ b/spec/integration/readline_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# These specs ensure that Pry doesn't require readline until the first time a
# REPL is started.
diff --git a/spec/method/patcher_spec.rb b/spec/method/patcher_spec.rb
index 24524d02..98c96dd6 100644
--- a/spec/method/patcher_spec.rb
+++ b/spec/method/patcher_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe Pry::Method::Patcher do
# rubocop:disable Style/SingleLineMethods
before do
diff --git a/spec/method_spec.rb b/spec/method_spec.rb
index 2d5a19f6..65ce0e96 100644
--- a/spec/method_spec.rb
+++ b/spec/method_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'set'
describe Pry::Method do
diff --git a/spec/pager_spec.rb b/spec/pager_spec.rb
index 4df0aad6..9c61cb63 100644
--- a/spec/pager_spec.rb
+++ b/spec/pager_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe "Pry::Pager" do
describe "PageTracker" do
before do
diff --git a/spec/prompt_spec.rb b/spec/prompt_spec.rb
index 58616cd5..04688d7e 100644
--- a/spec/prompt_spec.rb
+++ b/spec/prompt_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
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 24fa54c5..816481ff 100644
--- a/spec/pry_defaults_spec.rb
+++ b/spec/pry_defaults_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
_version = 1
describe "test Pry defaults" do
diff --git a/spec/pry_output_spec.rb b/spec/pry_output_spec.rb
index 8f905d02..3850da62 100644
--- a/spec/pry_output_spec.rb
+++ b/spec/pry_output_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe Pry do
describe "output failsafe" do
after { Pry.config.print = Pry::Config.new.print }
diff --git a/spec/pry_repl_spec.rb b/spec/pry_repl_spec.rb
index f407240a..946b92e8 100644
--- a/spec/pry_repl_spec.rb
+++ b/spec/pry_repl_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
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 da73c275..c320a905 100644
--- a/spec/pry_spec.rb
+++ b/spec/pry_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe Pry do
before do
@str_output = StringIO.new
diff --git a/spec/pryrc_spec.rb b/spec/pryrc_spec.rb
index 338f6b7e..a7b5fc2a 100644
--- a/spec/pryrc_spec.rb
+++ b/spec/pryrc_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe Pry do
describe 'loading rc files' do
before do
diff --git a/spec/ring_spec.rb b/spec/ring_spec.rb
index 2f023461..4c7efbb5 100644
--- a/spec/ring_spec.rb
+++ b/spec/ring_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe Pry::Ring do
let(:ring) { described_class.new(3) }
diff --git a/spec/run_command_spec.rb b/spec/run_command_spec.rb
index af81d96a..8cbb8e14 100644
--- a/spec/run_command_spec.rb
+++ b/spec/run_command_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe "Pry.run_command" do
before do
o = Object.new
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index b6111e27..c8315144 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
if ENV['COVERAGE']
require 'simplecov'
SimpleCov.start
diff --git a/spec/sticky_locals_spec.rb b/spec/sticky_locals_spec.rb
index 1fa75f87..ed6b29e0 100644
--- a/spec/sticky_locals_spec.rb
+++ b/spec/sticky_locals_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe "Sticky locals (_file_ and friends)" do
it 'locals should all exist upon initialization' do
expect { pry_eval '_file_', '_dir_', '_ex_', 'pry_instance', '_' }
diff --git a/spec/support/mock_pry.rb b/spec/support/mock_pry.rb
index c7246111..555acee1 100644
--- a/spec/support/mock_pry.rb
+++ b/spec/support/mock_pry.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
def mock_pry(*args)
args.flatten!
binding = args.first.is_a?(Binding) ? args.shift : binding()
diff --git a/spec/support/repl_tester.rb b/spec/support/repl_tester.rb
index ea0419e7..b6e7585e 100644
--- a/spec/support/repl_tester.rb
+++ b/spec/support/repl_tester.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'delegate'
# This is for super-high-level integration testing.
diff --git a/spec/syntax_checking_spec.rb b/spec/syntax_checking_spec.rb
index 9312c6a5..ec7f5b36 100644
--- a/spec/syntax_checking_spec.rb
+++ b/spec/syntax_checking_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe Pry do
before do
@str_output = StringIO.new
diff --git a/spec/system_command_handler_spec.rb b/spec/system_command_handler_spec.rb
index 810fd606..45893e5d 100644
--- a/spec/system_command_handler_spec.rb
+++ b/spec/system_command_handler_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'stringio'
RSpec.describe Pry::SystemCommandHandler do
diff --git a/spec/unrescued_exceptions_spec.rb b/spec/unrescued_exceptions_spec.rb
index 0874f0fa..592ac20f 100644
--- a/spec/unrescued_exceptions_spec.rb
+++ b/spec/unrescued_exceptions_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe "Pry.config.unrescued_exceptions" do
before do
@str_output = StringIO.new
diff --git a/spec/warning_spec.rb b/spec/warning_spec.rb
index 18bfa219..9c94ad5d 100644
--- a/spec/warning_spec.rb
+++ b/spec/warning_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
RSpec.describe Pry::Warning do
describe "#warn" do
it "prints message with file and line of the calling frame" do
diff --git a/spec/wrapped_module_spec.rb b/spec/wrapped_module_spec.rb
index f290fc76..a97affb9 100644
--- a/spec/wrapped_module_spec.rb
+++ b/spec/wrapped_module_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
describe Pry::WrappedModule do
describe "#initialize" do
it "should raise an exception when a non-module is passed" do