Capybara debugging Javascript
Debugging Javascript in Capybara feature specs can be challenging (to say the least), because AFAIK you can’t drop ‘debugger’ into…
Achieving Developer Excellence with Automated Testing
Ruby
Debugging Javascript in Capybara feature specs can be challenging (to say the least), because AFAIK you can’t drop ‘debugger’ into…
So let’s say you are, for example, upgrading your Rails app and when you boot it you get a crash…
Ruby’s most commonly used method is probably each, an iterator that can act on an Array, Hash, Range, or any…
I discovered an interesting difference between two patch levels of the same Ruby (1.8.7) def index respond_to do |format| format.html…
Quick demonstration of public, private, and protected methods.
Reads a file line by line into an array my_stuff my_stuff = [] file = File.new(“config/random_categories.txt”, “r”) while (line =…
Very quick rdebug primer for using the debugger in Mongrel. <h1>Setting Up your Environment for Debugging</h1> gem install ruby-debug If…
A good area to spend some time for someone new to Ruby is to understand about objects. This serves as…
Ruby syntax for working with arrays (cheat-sheet):
def hilite_search_criteria(pattern, search_criteria) return if pattern.nil? or search_criteria.nil? pattern.gsub!(/(]*>)|\n|\t/s) {” “} match_char = pattern =~ /#{search_criteria}/i matched_string = $~.to_s return…