Friday, December 4, 2009

Rails Metal real-world example with RSpec integration test

There's not that much information out there about Rails Metal, and even less about how to test Metal classes using RSpec. If I had time I would create a new RSpec ExampleGroup with a lot of the goodness of the ControllerExampleGroup, but alas I don't.

So integration tests will have to do. I had problems with using response.should be_success. The docs say it exists, but it doesn't for me. YMMV.

Anyways, here is my Metal class along with the integration test:

No comments: