I’ve been thinking about ways to simplify rails integration testing. I wanted to see how well I could do it without cucumber and rspec. I decided to go pure minitest with capybara to help out. What emerged was the TestPilot pattern. Let’s check it out.
Read the rest of this entry »
The SmartLogic Blog
SmartLogic is a web and mobile product development studio based in Baltimore. Contact us for help building your product or visit our website to learn more about what we do.
TestPilot – Rails Integration Testing Pattern
October 26th, 2010 by Nick GauthierTesting AJAX with Test::Unit
October 8th, 2010 by Nick GauthierIf you want real end-to-end testing of a page with functioning AJAX, use Selenium. But I was interested in doing just a bit of JS speccing to make sure that the AJAX routes I called worked and that the data that came back fit the JS that I had written.
So, I figured with a little capybara and a little therubyracer, I could test my javascript with real route calls. Let’s check it out.
Read the rest of this entry »
Nick’s Highlights from Windy City Rails
September 11th, 2010 by Nick GauthierI attended and spoke at Windy City Rails. I tried to take more notes this time. Out of 6 talks an lightning talks, I have ~500 lines of notes. Enjoy!.
Read the rest of this entry »
Nick’s Highlights from Ruby Hoedown
September 7th, 2010 by Nick GauthierI attended and spoke at Ruby Hoedown 2010. Below are my notes from the conference.
Nick’s Highlights from Lone Star Ruby Conf
August 30th, 2010 by Nick GauthierI recently attended and spoke at Lone Star Ruby Conf 2010. I took notes on anything technical I thought would be useful to bring back and use day-to-day at SmartLogic. Keep in mind there were many excellent talks that aren’t on this list, it’s just a snippet of things I wanted to look into more.
Installing PostGIS 1.5 on PostgreSQL 8.4 on Ubuntu
March 4th, 2010 by Nick GauthierI had a bit of trouble installing the latest PostGIS 1.5 under PostgreSQL 8.4. Here are my instructions. These work on Ubuntu 8.04, 9.04, 9.10, 10.04, and 10.10.
Using Byobu and Landscape to improve remote Ubuntu sessions
January 22nd, 2010 by Nick GauthierSSHing into remote servers can be an awkward experience, but it doesn’t have to be. You can turn your ssh console into a terminal-style window manager with Byobu, and get more system information via landscape.
Read the rest of this entry »
DRY up your Controllers with find_or_redirect
October 23rd, 2009 by Nick GauthierDo you do this:
class ModelsController < ApplicationController
before_filter :find_model
def show
end
def destroy
@model.destroy
end
private
def find_model
@model = Model.find_by_id(params[:id])
unless @model
redirect_to :action => :index
flash[:error] = "Invalid model id"
return false
end
end
end
in every controller? Gets repetitive doesn’t it?
Read the rest of this entry »
Mount options to improve ext4 file system performance
June 4th, 2009 by Nick GauthierI recently boosted my rails test suite running time by around 30% by adding certain mount options for my ext4 partition (works for ext3 too). I thought I’d blog about it because the first time I tried my system wouldn’t boot! So here are the step by step instructions:
Find the Unique Sessions for a Rails Application
May 4th, 2009 by Nick GauthierToday we’re going to look at how to find the number of unique sessions over a specific time frame for a rails application. We’ll be using the slow-actions gem.