In previous commit (5d983f49a2) I added
Enumerators to unit tests. It appears that Enumerator is not available
for Ruby 1.8.7 and friends. So, let's rewrite the related to Enumerator
code and hard-code everything again.
Signed-off-by: Kyrylo Silin <kyrylosilin@gmail.com>
First of all, rewrite `test_cd.rb`, so instead of hard-coded so called
"binding stack" and "old stack" strings with indices (`bs1`, `os2`,
etc.) we use Enumerator that lazily creates these strings for us.
Also, implement exactly the same Enumerator for the
`test_command_integration.rb`, because we use there a lot of operations
with binding stack.
Next, replace all unwanted use of global variables in other unit tests
with Pad.
Signed-off-by: Kyrylo Silin <kyrylosilin@gmail.com>
Clean up repeating code on the subject of str_output variable. Fix
indentation in some files and restructure some tests, in order to
ease parsing of files by an eye.
Signed-off-by: Kyrylo Silin <kyrylosilin@gmail.com>
Signed-off-by: Yorick Peterse <yorickpeterse@gmail.com>