Skip to content

Instantly share code, notes, and snippets.

View knoopx's full-sized avatar

Víctor Martínez knoopx

View GitHub Profile
@knoopx
knoopx / exception_helper.rb
Created November 9, 2011 14:30 — forked from agibralter/exception_helper.rb
Accessing app errors when using Capybara/Selenium with RSpec
# -*- encoding : utf-8 -*-
# Because Capybara.app gets run by Thin in a separate thread, errors raised in
# the application during request_specs get hidden and just show up in the
# selenium-controller browser as 500 errors with no extra info. This module
# helps us dig into those errors.
module RequestSpecs
module ExceptionHelper
@@last_exception = nil
$(document).ready(function () {
var TableParser = function () {
function isEmpty(line) {
var empty = true;
$.each(line, function(_, value) {
if (value.trim()) {
empty = false;
return false;
}