summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorAndré Luis Leal Cardoso Junior <andrehjr@gmail.com>2022-06-11 10:27:02 -0300
committerGitHub <noreply@github.com>2022-06-11 10:27:02 -0300
commit6aab1351c919b49011e7fa98b4e5e31f3b5811ed (patch)
tree4c2236e56714695f5cdcec44e1b2db707118a22c /spec
parent8bbbd11dbcf35f38c0a96ea069256a6ece8298f5 (diff)
parent668278cebeffc70f05a36a141f01989ef4934856 (diff)
downloadpry-6aab1351c919b49011e7fa98b4e5e31f3b5811ed.tar.gz
Merge pull request #2239 from andrehjr/drop-ruby-1-9-3
Drop support for Ruby 1.9.x
Diffstat (limited to 'spec')
-rw-r--r--spec/commands/edit_spec.rb8
-rw-r--r--spec/editor_spec.rb8
-rw-r--r--spec/exception_handler_spec.rb2
-rw-r--r--spec/integration/hanami_spec.rb3
-rw-r--r--spec/pryrc_spec.rb13
5 files changed, 8 insertions, 26 deletions
diff --git a/spec/commands/edit_spec.rb b/spec/commands/edit_spec.rb
index c51cc59d..cc40bd0e 100644
--- a/spec/commands/edit_spec.rb
+++ b/spec/commands/edit_spec.rb
@@ -23,13 +23,7 @@ describe "edit" do
before do
# OS-specific tempdir name. For GNU/Linux it's "tmp", for Windows it's
# something "Temp".
- @tf_dir =
- if Pry::Helpers::Platform.mri_19?
- Pathname.new(Dir::Tmpname.tmpdir)
- else
- Pathname.new(Dir.tmpdir)
- end
-
+ @tf_dir = Pathname.new(Dir.tmpdir)
@tf_path = File.expand_path(File.join(@tf_dir.to_s, 'bar.rb'))
FileUtils.touch(@tf_path)
end
diff --git a/spec/editor_spec.rb b/spec/editor_spec.rb
index 2005bf1c..a89edfd9 100644
--- a/spec/editor_spec.rb
+++ b/spec/editor_spec.rb
@@ -6,13 +6,7 @@ describe Pry::Editor do
before do
# OS-specific tempdir name. For GNU/Linux it's "tmp", for Windows it's
# something "Temp".
- @tf_dir =
- if Pry::Helpers::Platform.mri_19?
- Pathname.new(Dir::Tmpname.tmpdir)
- else
- Pathname.new(Dir.tmpdir)
- end
-
+ @tf_dir = Pathname.new(Dir.tmpdir)
@tf_path = File.join(@tf_dir.to_s, 'hello world.rb')
@editor = Pry::Editor.new(Pry.new)
diff --git a/spec/exception_handler_spec.rb b/spec/exception_handler_spec.rb
index b1608509..c9f082f6 100644
--- a/spec/exception_handler_spec.rb
+++ b/spec/exception_handler_spec.rb
@@ -47,7 +47,7 @@ RSpec.describe Pry::ExceptionHandler do
end
before do
- if RUBY_VERSION.start_with?('1.9', '2.0')
+ if RUBY_VERSION.start_with?('2.0')
skip("Ruby #{RUBY_VERSION} doesn't support nested exceptions")
end
end
diff --git a/spec/integration/hanami_spec.rb b/spec/integration/hanami_spec.rb
index 5fae6ef8..71f89ab9 100644
--- a/spec/integration/hanami_spec.rb
+++ b/spec/integration/hanami_spec.rb
@@ -10,9 +10,6 @@ RSpec.describe "Hanami integration" do
end
it "does not enter an infinite loop (#1471, #1621)" do
- if RUBY_VERSION.start_with? "1.9"
- skip "prepend is not supported on this version of Ruby"
- end
code = <<-RUBY
require "pry"
require "timeout"
diff --git a/spec/pryrc_spec.rb b/spec/pryrc_spec.rb
index 59f2eed9..e5bfe259 100644
--- a/spec/pryrc_spec.rb
+++ b/spec/pryrc_spec.rb
@@ -24,16 +24,13 @@ describe Pry do
expect(TEST_RC).to eq [0]
end
- # Resolving symlinks doesn't work on jruby 1.9 [jruby issue #538]
- unless Pry::Helpers::Platform.jruby_19?
- it "should not load the rc file twice if it's symlinked differently" do
- Pry.config.rc_file = 'spec/fixtures/testrc'
- stub_const('Pry::LOCAL_RC_FILE', 'spec/fixtures/testlinkrc')
+ it "should not load the rc file twice if it's symlinked differently" do
+ Pry.config.rc_file = 'spec/fixtures/testrc'
+ stub_const('Pry::LOCAL_RC_FILE', 'spec/fixtures/testlinkrc')
- Pry.start(self, input: StringIO.new("exit-all\n"), output: StringIO.new)
+ Pry.start(self, input: StringIO.new("exit-all\n"), output: StringIO.new)
- expect(TEST_RC).to eq [0]
- end
+ expect(TEST_RC).to eq [0]
end
it "should not load the pryrc if pryrc's directory permissions do not allow this" do