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

16 commits

Author SHA1 Message Date
Kyrylo Silin
96c6958cc6 specs: convert to shoulds to expects 2015-03-10 22:49:29 +02:00
John Mair
0807328bcf Rename helper spec: singleton_class(arg) -> eigenclass(arg)
It was causing the most ridiculous non-sensical test failures, possibly a bug in Ruby itself, but this patch fixes it
2015-02-16 21:13:35 +01:00
Matijs van Zuijlen
ffff9ba85a Fix JRuby-specific warnings 2015-01-23 14:56:19 +01:00
Matijs van Zuijlen
96b61f14aa Fix some warnings 2015-01-23 14:03:36 +01:00
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
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
b39ba9725b Disable spec to work around rubinius/rubinius#2871 2014-01-19 20:48:31 -08:00
Ryan Fitzgerald
3bbe0f0c32 Remove support for 1.8-compatible versions of Ruby 2014-01-19 17:43:07 -08:00
Conrad Irwin
01c6f60b7a undo whitespace changes 2013-12-11 08:44:49 -08:00
Deepender
5717ff487b method_spec.rb fixed 2013-12-11 16:39:52 +05:30
Deepender
24ab88a307 issue 998 test added 2013-12-11 15:43:05 +05:30
Kyrylo Silin
e18bb8bf53 spec/method_spec.rb: cleanup Object after method addition 2013-11-22 01:34:19 +02:00
Aldric Giacomoni
50733344ae Stat now supports top-level method aliases
FIX #812
2013-11-15 21:37:42 -05:00
John Mair
97f1be86b2 Refactor Pry::Method + add Pry::Method::WeirdMethodLocator
WeirdMethodLocator is used by Pry::Method.from_binding() to locate the
method captured by the binding when the naive approach fails (i.e method(binding.eval('__method__')).

"WeirdMethods" include methods defined on the superclass to the 'self' of the binding, as well as methods
that have subsequently been renamed/replaced.

We also move Pry::Method::Disowned to its own file (disowned.rb)
2013-02-02 22:37:25 +01:00
John Mair
5f3129f44b Pry::Method.from_str() can no longer raise an exception
/cc @ryanf the following used to cause exceptions: Pry::Method.from_str("NonexistentClass#method", binding)
I just wrapped from_str in a rescue Pry::RescuableException
2012-12-22 22:59:03 +01:00
☈king
848b6bdbeb Rename for tabcompletion-friendliness. 2012-11-15 18:59:51 -06:00
Renamed from test/test_method.rb (Browse further)