1
0
Fork 0
mirror of https://github.com/pry/pry.git synced 2022-11-09 12:35:05 -05:00
Commit graph

23 commits

Author SHA1 Message Date
Josh Cheek
144d32e1d6 Switch test suite to RSpec
Removes Bacon and Mocha

Reasoning explained in this comment: https://github.com/pry/pry/issues/277#issuecomment-51708712

Mostly this went smoothly. There were a few errors that I fixed along
the way, e.g. tests that were failing but for various reasons still
passed. Should have documented them, but didn't think about it until
very near the end. But generaly, I remember 2 reasons this would happen:
`lambda { raise "omg" }.should.raise(RuntimeError, /not-omg/)` will pass
because the second argument is ignored by Bacon. And `1.should == 2`
will return false instead of raising an error when it is not in an it
block (e.g. if stuck in a describe block, that would just return false)

The only one that I felt unsure about was spec/helpers/table_spec.rb
`Pry::Helpers.tablify_or_one_line('head', %w(ing)).should == 'head: ing'`
This is wrong, but was not failing because it was in a describe block
instead of an it block.  In reality, it returns `"head: ing\n"`,
I updated the test to reflect this, though I don't know for sure
this is the right thing to do

This will fail on master until https://github.com/pry/pry/pull/1281 is merged.
This makes https://github.com/pry/pry/pull/1278 unnecessary.
2014-08-10 17:37:21 -06:00
Ryan Fitzgerald
7bf25494e2 Fix delegation of quiet? config method (fix #1261)
Because we were defining `quiet?` on Pry::Config::Default, calls to it
would always delegate to the default config object and then return
false. To make it possible to enable quiet mode, we need the
transformation from `quiet?` to `quiet` to happen earlier. The simplest
way to accomplish this is just to define the `quiet?` method explicitly.
2014-07-06 16:38:13 -07:00
Conrad Irwin
44463e7d85 Stop using compatibility aliases for Pry.config 2014-05-01 01:51:01 -07:00
Robert Gleeson
74135c1890 allow for tests to be run with ease.
'bacon spec/config_spec.rb' instead of 'bacon -I spec spec/config_spec.rb'
2014-03-14 05:31:24 +01:00
Ryan Fitzgerald
67806cff46 Unwrap last exception when setting _ex_ 2014-03-09 19:39:01 -07:00
Robert Gleeson
24bbe12dc2 add Pry::LastException.
pry adds behavior(methods) to the exception it returns at _pry_.last_exception
in a repl but when the exception has been passed along as a frozen object ruby
will raise an exception and pry fails to function as usual.

the commit changes that behavior so that the exception is wrapped in an instance of
Pry::LastException who is a subclass of BasicObject. Pry::LastException is a copy&paste
of what was defined dynamically in pry_instance.rb but it allows for frozen exceptions
to remain frozen and still provides the methods pry dynamically defined on an exception
object before. through a wrapper class pry also no longer modifies an exception object
that it doesn't own.
2014-03-10 02:59:11 +01:00
Ryan Fitzgerald
add29398f0 Fix failing jruby spec 2014-01-19 17:43:07 -08:00
Ryan Fitzgerald
3bbe0f0c32 Remove support for 1.8-compatible versions of Ruby 2014-01-19 17:43:07 -08:00
Ryan Fitzgerald
42db0125ac Don't break if __FILE__ is relative and backtrace isn't 2013-07-27 16:14:09 -07:00
Conrad Irwin
ab4cc3d826 Allow frozen_object.pry 2013-04-25 01:09:06 -07:00
Conrad Irwin
78caffbcbc Dedup .pryrc across symlinks too 2013-02-17 21:33:18 -08:00
Kyrylo Silin
b5eec6d882 Pry: don't strip newlines from multi-line exprs
Fix issue #704 (newlines are stripped from inside pasted strings)

Also, make sure that other literals (system calls, regexps) also comply
this rule.

Reviewed-by: Conrad Irwin <conrad.irwin@gmail.com>
2013-02-01 07:25:22 +02:00
Ryan Fitzgerald
8e289528cd Merge branch 'master' into wip.refactor 2013-01-05 19:30:14 -08:00
Jordon Bedwell
f2168f1793 Make pryrc load errors more useful. 2013-01-01 03:40:36 -06:00
Conrad Irwin
b9117c8619 Tidier test for BasicObject support 2012-12-28 14:19:38 -08:00
Ryan Fitzgerald
26a4e43a8c Fix @backtace typo, add spec 2012-12-27 19:34:52 -08:00
Conrad Irwin
eeb67684d0 Add Pry::Driver to handle the reading and looping 2012-12-20 01:34:32 -08:00
Conrad Irwin
d31967799c Remove more rep() from spec/pry_spec.rb 2012-12-18 00:11:08 -08:00
Ryan Fitzgerald
5da52a02ca Fix calls to repl() in tests 2012-12-17 23:49:13 -08:00
Conrad Irwin
ed3d043f25 Stop using rep in pry_spec.rb 2012-12-15 15:59:47 -08:00
Ryan Fitzgerald
cbf19cc7a4 Move all fixtures into fixtures/ 2012-12-09 11:42:41 -08:00
John Mair
31a9578228 cleaned up lib/pry/test/helper.rb
* removed most historicla junk from lib/pry/test/helper.rb
* relocated recalcitrant junk to the local spec/helper.rb (this isn't exposed to 3rd parties)
2012-12-07 21:41:05 +01:00
☈king
848b6bdbeb Rename for tabcompletion-friendliness. 2012-11-15 18:59:51 -06:00
Renamed from test/test_pry.rb (Browse further)