Commit Graph

10 Commits

Author SHA1 Message Date
Ryan Fitzgerald 9b52d358ae Remove some unnecessary mock_prys 2012-09-08 22:29:00 -07:00
Ryan Fitzgerald 25cbe43137 Move all commands into individual files 2012-08-11 17:33:37 -07:00
Kyrylo Silin b3f71bc3b6 Don't use Enumerators in unit tests
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>
2012-07-12 00:32:35 +03:00
Kyrylo Silin 5d983f49a2 Use Pad instead of global variables in tests
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>
2012-07-11 21:50:44 +03:00
Kyrylo Silin 8f3e4555ba Tidy up tests and remove some repeating code
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>
2012-06-11 19:33:04 +02:00
John Mair 527e9d1c19 supercharged Pry.commands.alias_command method
* Now accepts arbitrary command code for alias, e.g
  alias_command "lM", "ls -M"
* Adds all aliases to the "Aliases" group in `help`
2012-03-26 00:28:27 +13:00
John Mair 81c0130815 fixed bug where Command#run "cd .." would error
* error was due to an extra space being appended to string, which messed up `cd` command parsing
* fixed by applying a simple #rstrip; updated tests
2012-03-08 15:38:12 +13:00
Conrad Irwin 656b1fc9aa Put "help" command in its own file 2012-02-22 23:35:07 -08:00
Conrad Irwin ec93ccadb7 Test works now [Fixes #34] 2012-01-18 22:06:03 -08:00
Conrad Irwin af5e96bf3c cleave test_pry into three. [Fixes #417] 2012-01-13 00:18:26 -08:00