summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorKyrylo Silin <silin@kyrylo.org>2019-03-24 15:36:06 +0200
committerKyrylo Silin <silin@kyrylo.org>2019-03-24 15:36:06 +0200
commit07de304553458884e38ae78c4a8854b6b21d9985 (patch)
tree8f8337343c2ec7072b706ea986c5f28b58484cda /spec
parent5ceb7ff04a328ff0da1460feb7715be0fd7fcb5b (diff)
downloadpry-07de304553458884e38ae78c4a8854b6b21d9985.tar.gz
rubocop: fix Naming/HeredocDelimiterNaming cop
Diffstat (limited to 'spec')
-rw-r--r--spec/command_spec.rb8
-rw-r--r--spec/commands/cat_spec.rb8
-rw-r--r--spec/commands/edit_spec.rb4
-rw-r--r--spec/commands/show_source_spec.rb8
-rw-r--r--spec/commands/whereami_spec.rb8
-rw-r--r--spec/helpers/table_spec.rb8
-rw-r--r--spec/pry_repl_spec.rb4
7 files changed, 24 insertions, 24 deletions
diff --git a/spec/command_spec.rb b/spec/command_spec.rb
index 185525bc..ab10c56f 100644
--- a/spec/command_spec.rb
+++ b/spec/command_spec.rb
@@ -422,11 +422,11 @@ describe "Pry::Command" do
end
it 'should accept multiline blocks' do
- @t.eval <<-EOS
+ @t.eval <<-COMMAND
walking-spanish | do
:jesus
end
- EOS
+ COMMAND
expect(@context.instance_variable_get(:@x)).to eq :jesus
end
@@ -595,11 +595,11 @@ describe "Pry::Command" do
end
end
- @t.eval <<-EOS
+ @t.eval <<-COMMAND
walking-spanish | do |x, y|
[x, y]
end
- EOS
+ COMMAND
expect(@context.instance_variable_get(:@x)).to eq [1, 2]
end
diff --git a/spec/commands/cat_spec.rb b/spec/commands/cat_spec.rb
index 8ab7a30f..25a151d1 100644
--- a/spec/commands/cat_spec.rb
+++ b/spec/commands/cat_spec.rb
@@ -58,12 +58,12 @@ describe "cat" do
@t.insert_nil_input # normally happens when a command is executed
@t.eval ':hello'
- expect(@t.eval('cat --in 1..3')).to eq unindent(<<-EOS)
+ expect(@t.eval('cat --in 1..3')).to eq(unindent(<<-RANGE))
1:
10
3:
:hello
- EOS
+ RANGE
end
end
@@ -78,13 +78,13 @@ describe "cat" do
end
it 'cat --ex should display repl code that generated exception' do
- @t.eval unindent(<<-EOS)
+ @t.eval(unindent(<<-LAST_EXCEPTION))
begin
this raises error
rescue => e
pry_instance.last_exception = e
end
- EOS
+ LAST_EXCEPTION
expect(@t.eval('cat --ex')).to match(/\d+:(\s*) this raises error/)
end
diff --git a/spec/commands/edit_spec.rb b/spec/commands/edit_spec.rb
index 7b2f57d3..114906f6 100644
--- a/spec/commands/edit_spec.rb
+++ b/spec/commands/edit_spec.rb
@@ -476,7 +476,7 @@ describe "edit" do
Object.remove_const :X if defined? ::X
Object.remove_const :A if defined? ::A
@tempfile = Tempfile.new(['pry', '.rb'])
- @tempfile.puts <<-EOS
+ @tempfile.puts(<<-CLASSES)
module A
def a
:yup
@@ -516,7 +516,7 @@ describe "edit" do
end
end
end
- EOS
+ CLASSES
@tempfile.flush
load @tempfile.path
diff --git a/spec/commands/show_source_spec.rb b/spec/commands/show_source_spec.rb
index 48942b15..13bb86e9 100644
--- a/spec/commands/show_source_spec.rb
+++ b/spec/commands/show_source_spec.rb
@@ -325,7 +325,7 @@ describe "show-source" do
describe "on variables that shadow methods" do
before do
- @t = pry_tester.eval unindent(<<-EOS)
+ @t = pry_tester.eval(unindent(<<-SHADOWED_VAR))
class ::TestHost
def hello
hello = proc { ' smile ' }
@@ -334,7 +334,7 @@ describe "show-source" do
end
end
::TestHost.new.hello
- EOS
+ SHADOWED_VAR
end
after do
@@ -456,7 +456,7 @@ describe "show-source" do
end
before do
- pry_eval unindent(<<-EOS)
+ pry_eval(unindent(<<-CLASSES))
class Dog
def woof
end
@@ -466,7 +466,7 @@ describe "show-source" do
def woof
end
end
- EOS
+ CLASSES
end
after do
diff --git a/spec/commands/whereami_spec.rb b/spec/commands/whereami_spec.rb
index be87a3f9..1ccac2ef 100644
--- a/spec/commands/whereami_spec.rb
+++ b/spec/commands/whereami_spec.rb
@@ -80,9 +80,9 @@ describe "whereami" do
) do
class Cor
def blimey!
- eval <<-END, binding, "spec/fixtures/example.erb", 1
+ eval(<<-WHEREAMI, binding, 'spec/fixtures/example.erb', 1)
pry_eval(binding, 'whereami')
- END
+ WHEREAMI
end
end
@@ -96,11 +96,11 @@ describe "whereami" do
'would raise an error'
) do
class Cor
- eval <<-END, binding, "spec/fixtures/example.erb", 1
+ eval <<-WHEREAMI, binding, "spec/fixtures/example.erb", 1
def blimey!
pry_eval(binding, 'whereami')
end
- END
+ WHEREAMI
end
expect { Cor.instance_method(:blimey!).source }
diff --git a/spec/helpers/table_spec.rb b/spec/helpers/table_spec.rb
index c35e6ad9..be243460 100644
--- a/spec/helpers/table_spec.rb
+++ b/spec/helpers/table_spec.rb
@@ -47,7 +47,7 @@ assfsafsfsds fsasa ssdsssafsdasdf
end
it 'should handle... another basic case' do
- try_round_trip(<<-EOT)
+ try_round_trip(<<-TABLE)
aaad dasaasffaasf fdasfdfss safdfdddsasd
aaadfasassdfff ddadadassasdf fddsasadfssdss sasf
aaddaafaf dddasaaaaaa fdsasad sddsa
@@ -56,14 +56,14 @@ adasadfaaffds dsfafdsfdfssda ffadsfafsaafa ss
asddaadaaadfdd dssdss ffssfsfafaadss ssas
asdsdaa faadf fsddfff ssdfssff
asfadsssaaad fasfaafdssd s
- EOT
+ TABLE
end
it 'should handle colors' do
- try_round_trip(<<-EOT)
+ try_round_trip(<<-TABLE)
\e[31maaaaaaaaaa\e[0m \e[31mccccccccccccccccccccccccccccc\e[0m
\e[31mbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb\e[0m \e[31mddddddddddddd\e[0m
- EOT
+ TABLE
end
it 'should handle empty input' do
diff --git a/spec/pry_repl_spec.rb b/spec/pry_repl_spec.rb
index 6145226e..5430a0a7 100644
--- a/spec/pry_repl_spec.rb
+++ b/spec/pry_repl_spec.rb
@@ -128,11 +128,11 @@ describe Pry::REPL do
def output.tty?
true
end
- input <<EOS
+ input <<TAB
loop do
break #note the tab here
end
-EOS
+TAB
output("do\n break #note the tab here\nend\n\e[1B\e[0G=> nil")
end
end