diff options
author | T.Yasuma <31178796+wakasa51@users.noreply.github.com> | 2021-10-11 18:10:14 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-11 12:10:14 +0300 |
commit | 5590e095ae97bfed0374ee0e1f58a78dae855d8f (patch) | |
tree | 6daaead2d091c232ed6c003703ed89c986db5d06 /spec | |
parent | 332255a395cbe192b2d834d7230984ef2c89126c (diff) | |
download | pry-5590e095ae97bfed0374ee0e1f58a78dae855d8f.tar.gz |
fix pry indent frozen error (#2136)
* fix pry indent frozen error
* fix generation of mutable strings
* fix String.new with no argument
* rubocop: fix offences of the Style/EmptyLiteral cop
Diffstat (limited to 'spec')
-rw-r--r-- | spec/indent_spec.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/indent_spec.rb b/spec/indent_spec.rb index 29c07a5f..a705d8bc 100644 --- a/spec/indent_spec.rb +++ b/spec/indent_spec.rb @@ -305,6 +305,14 @@ OUTPUT expect(@indent.indent(input)).to eq output end + it "should not raise error, if MIDWAY_TOKENS are used without indentation" do + expect { @indent.indent("when") }.not_to raise_error + expect { @indent.reset.indent("else") }.not_to raise_error + expect { @indent.reset.indent("elsif") }.not_to raise_error + expect { @indent.reset.indent("ensure") }.not_to raise_error + expect { @indent.reset.indent("rescue") }.not_to raise_error + end + describe "nesting" do test = File.read("spec/fixtures/example_nesting.rb") |