RailsCasts Pro episodes are now free!

Learn more or hide this

bbozo's Profile

GitHub User: bbozo

Comments by

Avatar

update: bundle update fixed binding.pry in tests

Avatar

This is actually a feature, you can use binding.pry to troubleshoot why tests fail, I even did:

ruby
class Test::Unit::TestCase
  alias_method :assert_block_without_pry, :assert_block

  def assert_block(message="assert_block failed.") # :yields: 
    begin
      assert_block_without_pry(message){ yield }
    rescue Exception => e
      binding.pry
      raise e
    end
  end
end

...but binding pry stopped working for me a week ago in tests, now it's throwing a NoMethodError: undefined methodactivate!' for nil:NilClass`