Skip to content

Commit

Permalink
Only test for SimpleStdio when Reline is defined, which happens for n…
Browse files Browse the repository at this point in the history
…ewer rubies
  • Loading branch information
andrehjr committed Mar 23, 2024
1 parent 58bc4f9 commit 50f56a1
Showing 1 changed file with 15 additions and 13 deletions.
28 changes: 15 additions & 13 deletions spec/config_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -172,24 +172,26 @@
end
end

describe "#input" do
context "when TERM=dumb" do
around do |example|
old_term = ENV['TERM']
ENV['TERM'] = 'dumb'

example.run
ENV['TERM'] = old_term
if defined?(Reline)
describe "#input" do
context "when TERM=dumb" do
around do |example|
old_term = ENV['TERM']
ENV['TERM'] = 'dumb'

example.run
ENV['TERM'] = old_term
end

it "configures input with SimpleStdio" do
expect(subject.input).to eql(Pry::Input::SimpleStdio)
end
end

it "configures input with SimpleStdio" do
expect(subject.input).to eql(Pry::Input::SimpleStdio)
expect(subject.input).to eql(Readline)
end
end

it "configures input with SimpleStdio" do
expect(subject.input).to eql(Readline)
end
end

describe "#method_missing" do
Expand Down

0 comments on commit 50f56a1

Please sign in to comment.