Tag Archives: Ruby

Ruby/Rails interview questions

25 Jul

I’ve recently been helping interview some ruby/rails developers. I searched the web for some inspiration but I could not find any example questions that had real depth to them. I like my questions to be a point of discussion rather than one word answers. Most importantly I want a wide enough scope to let those talented individuals shine through. So here are some of the questions I’ve been trying out recently.

(more…)

Rspec-rails mock_model helper for the RR test double framework

9 Jul

Rspec-rails is a rails plugin which brings the Rspec Ruby Behaviour Driven Development framework to rails along with some rails specific helpers. One of these hugely useful helper functions is:

mock_model(model_class, options_and_stubs = {})

This creates a mock object with the common methods stubbed out. It also allows you to specify other methods you want to stub.
(more…)

Textmate bundle for RR test double framework

7 Jul

A simple Textmate bundle for  RR the Ruby test double framework.  You can read about RR at http://github.com/btakita/rr/tree/master and look through the latest rdocs at Rubypub

Install with Git

(what on earth is Git…)

  1. Run this:
  2. mkdir -p ~/Library/Application\ Support/TextMate/Bundles/
    cd ~/Library/Application\ Support/TextMate/Bundles/
    git clone git://github.com/josephwilk/rr-tmbundle.git  rr.tmbundle
  3. Reload bundles in Textmate
  4. Enjoy!

Rspec Stories – Keeping Steps Dry

30 Apr

When using Rspec stories you have plain text stories which we call the ‘story’ file and the ‘story steps’ file that maps the plain text story to programmatic code. Generally you end up with your story files not being DRY. This is not a worry, your stories are the domain specific languages detailing your acceptance/integration tests. Its like saying that your Rails Models are not DRY because they repeat lots of 'has_one'!
(more…)

Rails Admins Plugins Review

14 Feb

A brief examination of some of the major Admin plugins for rails.

  • Lipsiaadmin
  • AutoAdmin
  • ActiveScaffold
  • Hobo
  • Streamlined

(more…)

Automatic Admin Systems – Semantics with Rails & Django

18 Jan

The Magically Appearing Admin

Web developers using an MVC framework produce their websites playing with their models, views and controllers. Then by adding a few lines of magic an admin system appears which allows users to add/edit/delete/view/search their models.

Examples:
Django’s Magic Admin (Also NewFormsAdmin – a branch of Django focused on making it easier to customise auto-admin)
Ruby on rails Plugins:

(more…)