John Bachir
John Bachir

Reputation: 22731

Any tool to assist in building REST controller specs?

I'm sick of writing out the same controller specs each time I make a new controller. I know I can use the scaffold generator, but there are enough little things I have to change that it usually doesn't save me much time.

Are there any projects/tools out there that provide some sort of base set of specs and/or a DSL to make this easier?

Upvotes: 0

Views: 87

Answers (2)

Marnen Laibow-Koser
Marnen Laibow-Koser

Reputation: 6337

I've never found that any two REST controllers I wanted to write had similar enough interfaces that the tests were at all similar (and generally, I recommend Cucumber, not controller specs).

Something like inherited_resources or Rails 3's respond_with is very useful for writing the controllers, but I'm not sure about the tests.

Upvotes: 1

sorens
sorens

Reputation: 5060

I use the decent_exposure gem.

Upvotes: 0

Related Questions