public
Description: Fixtures aren't fun. Machinist is.
Homepage:
Clone URL: git://github.com/notahat/machinist.git
Kevin Bullock (author)
Thu Oct 15 08:19:59 -0700 2009
notahat (committer)
Sat Oct 31 22:36:56 -0700 2009
machinist / FAQ.markdown
100644 19 lines (12 sloc) 0.486 kb

Machinist FAQ

My blueprint is giving me really weird errors. Any ideas?

If your object has an attribute that happens to correspond to a Ruby standard function, it won't work properly in a blueprint.

For example:

OpeningHours.blueprint do
  open { Time.now }
end

This will result in Machinist attempting to run ruby's open command. To work around this use self.open instead.

OpeningHours.blueprint do
  self.open { Time.now }
end