pry/pry — pull request #1301 by krissi (2014-09-12 17:25:27+00:00)
Title: Bulk conversion to expect syntax

I used transpec to do a bulk upgrade the specs which are (semi-) automatically updateable. I tried to put only similar changes into one commit that is easy to see them in a split diff. Except from b8382ec every commit should be "green".

I read the "taking it slow" part from #1294 perfectly timed after I finished this, so feel free to cherry-pick the non-transtec commits if that fits better into the upgrade plan ;)

This is way not enough to disable the should syntax (many files are untouched at all), but I think it is good have them converted to get a better overview of the 'real' work:

Converting spec/command_spec.rb
Cannot convert #should into #expect since #expect is not available in the context.
spec/command_spec.rb:235: args.should == ['four']
Cannot convert #should into #expect since #expect is not available in the context.
spec/command_spec.rb:236: opts[:f].should == 4
Cannot convert #should into #expect since #expect is not available in the context.
spec/command_spec.rb:260: opts.fetch_command(:blahblah).should == nil
Cannot convert #should into #expect since #expect is not available in the context.
spec/command_spec.rb:261: opts.fetch_command(:yell).present?.should == true
Cannot convert #should into #expect since #expect is not available in the context.
spec/command_spec.rb:277: args.should == ['papa']
Cannot convert #should into #expect since #expect is not available in the context.
spec/command_spec.rb:278: opts.fetch_command(:yell).present?.should == true
Cannot convert #should into #expect since #expect is not available in the context.
spec/command_spec.rb:279: opts.fetch_command(:yell).person?.should == true
Cannot convert #should into #expect since #expect is not available in the context.
spec/command_spec.rb:293: args.should == ['yell', 'papa', 'sonny', 'daughter']
Converting spec/commands/cd_spec.rb
Cannot convert #should into #expect since #expect is not available in the context.
spec/commands/cd_spec.rb:12: binding_stack.map { |b| b.eval('self') }.should == other
Converting spec/commands/edit_spec.rb
Cannot convert #should into #expect since #expect is not available in the context.
spec/commands/edit_spec.rb:563: X.method(:x).owner.should == self
Converting spec/commands/show_doc_spec.rb
Cannot convert #should into #expect since #expect is not available in the context.
spec/commands/show_doc_spec.rb:36: pry_eval(binding, 'show-doc').should =~ /sample comment/
Converting spec/commands/show_source_spec.rb
Cannot convert #should into #expect since #expect is not available in the context.
spec/commands/show_source_spec.rb:36: pry_eval(binding, 'show-source').should =~ /def @o.sample/
Cannot convert #should into #expect since #expect is not available in the context.
spec/commands/show_source_spec.rb:43: pry_eval(binding, 'show-source -l').should =~ /def @o.sample/
Converting spec/commands/whereami_spec.rb
Cannot convert #should into #expect since #expect is not available in the context.
spec/commands/whereami_spec.rb:23: pry_eval(binding, 'whereami').should =~ /Cor[#]blimey!/
Cannot convert #should into #expect since #expect is not available in the context.
spec/commands/whereami_spec.rb:36: should == File.expand_path(__FILE__)
Cannot convert #should into #expect since #expect is not available in the context.
spec/commands/whereami_spec.rb:110: pry_eval(binding, 'whereami 3').should =~ /class Cor/
Cannot convert #should into #expect since #expect is not available in the context.
spec/commands/whereami_spec.rb:124: pry_eval(binding, 'whereami -m').should =~ /def blimey/
Cannot convert #should into #expect since #expect is not available in the context.
spec/commands/whereami_spec.rb:137: pry_eval(binding, 'whereami -f').should =~ /show entire file when -f option used/
Cannot convert #should into #expect since #expect is not available in the context.
spec/commands/whereami_spec.rb:152: out.should =~ /class Cor/
Cannot convert #should into #expect since #expect is not available in the context.
spec/commands/whereami_spec.rb:153: out.should =~ /blimey/
Cannot convert #should into #expect since #expect is not available in the context.
spec/commands/whereami_spec.rb:166: out.should =~ /class Cor/
Cannot convert #should into #expect since #expect is not available in the context.
spec/commands/whereami_spec.rb:167: out.should =~ /blimey/
Cannot convert #should into #expect since #expect is not available in the context.
spec/commands/whereami_spec.rb:187: out.should =~ /class Cor/
Cannot convert #should into #expect since #expect is not available in the context.
spec/commands/whereami_spec.rb:188: out.should =~ /blimey/
Cannot convert #should into #expect since #expect is not available in the context.
spec/commands/whereami_spec.rb:199: out.should =~ /^\s*def/
Cannot convert #should_not into #expect since #expect is not available in the context.
spec/commands/whereami_spec.rb:200: out.should_not =~ /\=\>/
Converting spec/pry_spec.rb
Cannot convert #should into #expect since #expect is not available in the context.
spec/pry_spec.rb:12: input('BasicObject.new').should =~ /^=> #