diff options
author | Ryan Fitzgerald <rwfitzge@gmail.com> | 2014-03-13 23:11:19 -0700 |
---|---|---|
committer | Ryan Fitzgerald <rwfitzge@gmail.com> | 2014-03-13 23:28:52 -0700 |
commit | dcdc4776b6c009e835494f462c4016a7d930f2b1 (patch) | |
tree | c2b359c3b3010c0f8a9c5ff18467b3f464275e05 /spec/commands/find_method_spec.rb | |
parent | 82dc33445cd66d8ffeed371c857253887e54e671 (diff) | |
download | pry-minitest-bacon.tar.gz |
Switch from bacon to minitest-baconminitest-bacon
This gives us more flexibility to use the other assertion types built
into Minitest, use Minitest plugins, etc.
The process of setting it up also revealed some order dependencies and
other weirdness in the specs.
Diffstat (limited to 'spec/commands/find_method_spec.rb')
-rw-r--r-- | spec/commands/find_method_spec.rb | 34 |
1 files changed, 19 insertions, 15 deletions
diff --git a/spec/commands/find_method_spec.rb b/spec/commands/find_method_spec.rb index a00e8b90..a579cc71 100644 --- a/spec/commands/find_method_spec.rb +++ b/spec/commands/find_method_spec.rb @@ -1,21 +1,27 @@ require_relative '../helper' -MyKlass = Class.new do - def hello - "timothy" - end - def goodbye - "jenny" - end - def tea_tim? - "timothy" +describe "find-method" do + before do + class MyKlass + def hello + "timothy" + end + def goodbye + "jenny" + end + def tea_tim? + "timothy" + end + def tea_time? + "polly" + end + end end - def tea_time? - "polly" + + after do + Object.remove_const :MyKlass end -end -describe "find-method" do describe "find matching methods by name regex (-n option)" do it "should find a method by regex" do pry_eval("find-method hell MyKlass").should =~ @@ -59,5 +65,3 @@ describe "find-method" do pry_eval('find-method tea_time\? MyKlass').should =~ good end end - -Object.remove_const(:MyKlass) |