Unique Marketing, Guaranteed Results.

Culerity and Celerity, JavaScript enabled testing in Cucumber

June 8th, 2009 by jarodr

As you may know, testing JavaScript inesnsive applications using Cucumber can be a pain. There are several ways to handle this; Selenium, Watir and the like. The easiest way I have found however is by using Celerity a jRuby API for htmlUnit, a fully functional headless browser that completely supports JavaScript, and you don’t have to serve your application on jRuby to use it!. I was able to get Celerity to play nice duruing Cucumber tests by doing the following: First, you will need of course jRuby. The Culerity gem will start up Celerity in the jRuby environment, and proxy the actual browser through it. Download jRuby and extract it to wherever you want it located. In my case I put it in /opt, and set your PATH accordingly.

export PATH=$HOME/jruby/bin:$PATH

Next install the Celerity gem in jRuby (we are using the github version rather than the ruby forge version, as it provides a later version):

jruby -S gem install jarib-celerity --source=http://gems.github.com

Now install the Culerity gem. This provides the interface between Celerity and your environment without forcing you to run in jRuby

 gem install langalex-culerity --source http://gems.github.com

Place this in your test environment:

# config/environments/test.rb
 
config.gem "langalex-culerity", :lib => false

I call :lib => false here to avoid loading the gem. This is done in the file generated by culerity. Finally remove features/steps/webrat_steps.rb as it will conflict with Culerity, and run:

script/generate culerity

Enjoy! Culerity should have very similar syntax to webrat, however keep in mind you may see some differences that you may need to adjust.

Web Design and SEO Rap

May 8th, 2009 by Brandon Buttars

Here is a sweet rap song about web design coding and SEO.

April Fool’s Joke

April 1st, 2009 by jaredd
What I saw.

What I saw.

Well throughout the day when I went to use the restroom, the stalls were full of people in them, later i caught on that it was the same guys shoes.

And by the end of the day I was worried for the guys health and I went to investigate and this is what I found.

Read the rest of this entry »


Copyright © 2005-2010 PMA Media Group. All Rights Reserved