1
0
Fork 0
mirror of https://github.com/pry/pry.git synced 2022-11-09 12:35:05 -05:00
pry--pry/spec
r-obert 4391aa863e
add Pry::Testable, and friends. (#1679)
* add Pry::Testable, and friends.

This commit replaces lib/pry/test/helper.rb by using category modules.
There's now:

* Pry::Testable:
  * Pry::Testable::Evalable
  * Pry::Testable::Mockable
  * Pry::Testable::Utility
  * Pry::Testable::PryTester

'include Pry::Testable' includes all of the above.
For the pry test suite it worked out best to include 'Pry::Testable' at the top-level.

In plugins I've written though this hasn't been the case, and I only normally need:
Pry::Testable::Evalable. So it reduces pollution for the third-party cases, which this
code is intended for since it lives within lib/ of the project.

What do you think?

* breaking change: add set_testenv_variables and unset_testenv_variables

* breaking change: add Pry::Testable::Variables, and rename

constant_scope() to temporary_constants().

* breaking change: rename inject_var as insert_variable, and move its

definition to Pry::Testable::Variables.

* include Pry::Testable::Evalable & include Pry::Testable::Variables into

the top-level, but keep the other two modules spec-local.

* document third argument of insert_variable.

* update CHANGELOG.md

* note changelog entry is a breaking change

* update documentation
2017-11-04 05:32:31 +01:00
..
commands add Pry::Testable, and friends. (#1679) 2017-11-04 05:32:31 +01:00
config last_default might not be a Pry::Config::Memoized 2017-06-23 17:42:04 +01:00
fixtures Add .gitkeep to spec/fixtures/cdpathdir/ in order to fix tests 2015-06-17 17:02:27 +03:00
helpers specs: convert to shoulds to expects 2015-03-10 22:49:29 +02:00
method specs: convert to shoulds to expects 2015-03-10 22:49:29 +02:00
regression specs: convert to shoulds to expects 2015-03-10 22:49:29 +02:00
spec_helpers Fix some warnings 2015-01-23 14:03:36 +01:00
cli_spec.rb specs: convert to shoulds to expects 2015-03-10 22:49:29 +02:00
code_object_spec.rb specs: convert to shoulds to expects 2015-03-10 22:49:29 +02:00
code_spec.rb specs: convert to shoulds to expects 2015-03-10 22:49:29 +02:00
color_printer_spec.rb Issue #1647: Fix String#pp output color 2017-10-22 15:42:44 -05:00
command_helpers_spec.rb specs: convert to shoulds to expects 2015-03-10 22:49:29 +02:00
command_integration_spec.rb specs: convert to shoulds to expects 2015-03-10 22:49:29 +02:00
command_set_spec.rb Refactor command hooks so they could use Pry::Hooks (newer API) 2015-03-11 16:17:10 +02:00
command_spec.rb add Pry::Testable, and friends. (#1679) 2017-11-04 05:32:31 +01:00
completion_spec.rb Work around an unexpected success under JRuby 2016-12-13 23:46:28 +02:00
config_spec.rb fix bug discovered while investigating #1552 2016-07-09 02:54:03 +01:00
control_d_handler_spec.rb specs: convert to shoulds to expects 2015-03-10 22:49:29 +02:00
documentation_helper_spec.rb Syntax highlight <tt> tags in documentation output. 2015-06-24 16:36:03 +03:00
editor_spec.rb specs: convert to shoulds to expects 2015-03-10 22:49:29 +02:00
exception_whitelist_spec.rb specs: convert to shoulds to expects 2015-03-10 22:49:29 +02:00
helper.rb add Pry::Testable, and friends. (#1679) 2017-11-04 05:32:31 +01:00
history_array_spec.rb specs: convert to shoulds to expects 2015-03-10 22:49:29 +02:00
history_spec.rb Test histfile content 2016-02-11 13:06:11 -06:00
hooks_spec.rb Fix warning: Using the raise_error matcher without providing a specific error 2015-06-21 09:01:31 +09:00
indent_spec.rb singleline rescue should not change indentation. 2015-07-22 21:30:36 +03:00
method_spec.rb fix 2.4 warning in specs about deprecated constant (Fixnum). 2017-06-03 13:40:25 +01:00
pager_spec.rb specs: convert to shoulds to expects 2015-03-10 22:49:29 +02:00
prompt_spec.rb specs: convert to shoulds to expects 2015-03-10 22:49:29 +02:00
pry_defaults_spec.rb Remove duplicate after hook 2015-07-09 00:53:38 +09:00
pry_output_spec.rb add Pry::Testable, and friends. (#1679) 2017-11-04 05:32:31 +01:00
pry_repl_spec.rb return false from #piping? when $stdout is not an IO. 2015-08-24 03:08:41 +01:00
pry_spec.rb jruby-ing 2017-09-20 15:42:26 +01:00
pryrc_spec.rb Make spec work for ruby 1.9.3 and possibly other versions. 2015-06-29 00:15:23 +03:00
run_command_spec.rb specs: convert to shoulds to expects 2015-03-10 22:49:29 +02:00
sticky_locals_spec.rb specs: convert to shoulds to expects 2015-03-10 22:49:29 +02:00
syntax_checking_spec.rb specs: convert to shoulds to expects 2015-03-10 22:49:29 +02:00
wrapped_module_spec.rb specs: convert to shoulds to expects 2015-03-10 22:49:29 +02:00