Posted by James Mead
Sat, 02 Dec 2006 09:36:00 GMT
A while ago Jay Fields described a number of ways to share Ruby code between projects and focussed on a useful technique which involves using RubyGems and unpacking them into your vendor directory. He also mentions the difficulties of versioning with Rails plugins.
We use a number of Rails plugins at Reevoo. Initially we used Subversion externals to include them in our projects, but for a while now we’ve been successfully using François Beausoleil’s Piston which is effectively an extension to Subversion. You end up with a copy of the plugin code in your own repository with the relevant revision number from the remote repository stored in your own Subversion metadata. Piston prevents you getting new versions of the plugin code every time you update (as you would with an svn:external) which can lead to unexpected changes, but makes it straightforward to update to a newer version of a plugin when you want.
You can find Piston here.
Tags external, piston, plugin, rails, ruby, rubygem, svn, version | 1 comment
Posted by James Mead
Sun, 17 Sep 2006 17:28:00 GMT
My colleague Ben has just published a Rails plugin which should simplify setting up Selenium Remote Control to run acceptance tests for your Rails app. So read his article and give it a whirl.
Selenium tests run directly in the browser. You can run the same Selenium test against different browsers e.g. for browser compatability testing (all mainstream JavaScript-enabled browsers are supported). You can also use Selenium to test Ajax-based web applications. If you’re not familiar with Selenium, have a read about it and watch some tests run in your browser.
Jason Huggins gave a talk at the London Test Automation Conference on recording screencast-style movies during execution of Selenium tests as a way to generate up-to-date documentation. I was interested, because we’d knocked a similar idea around the office a few weeks previously.
He tried to demo it as part of a continuous integration setup with CruiseControl. Unfortunately his ambitious demo, involving Parallels Desktop, multiple virtual machines, multiple operating systems, multiple languages & multiple browsers, didn’t quite work during the talk itself, but I did see it working afterwards – it was pretty neat.
Tags acceptance, google, ltac, plugin, rubyonrails, selenium, talk, testing, virtualization | no comments
Posted by James Mead
Thu, 24 Aug 2006 17:59:00 GMT
A new version of the Mocha mocking and stubbing library developed at Reevoo has been released.
There is now a Ruby on Rails plugin which can be installed like this…
$ script/plugin install svn://rubyforge.org/var/svn/mocha/trunk
Here are the release notes…
- Rails plugin.
- Auto-verify for all expectations, including those on concrete classes.
- Include each expectation verification in the test result assertion count.
- Filter out noise from assertion backtraces.
- Point assertion backtrace to line where failing expectation was created.
- New yields method for expectations.
- Create stubs which stub all method calls.
- Mocks now respond_to? expected methods.
Thanks for patches from Chris.
Enjoy!
Posted in mocha_release | Tags expectation, fixtures, mock, mocking, plugin, rails, ruby, stub, stubbing, test, testing, verify | 14 comments