[rspec-users] Specs for ApplicationController, where to put them?
t.lucas at toolmantim.com
Tue May 29 19:13:42 EDT 2007
On 25/05/2007, at 5:16 AM, Anthony Carlos wrote:
> I'm sorry, but I'm a newbie and I don't fully understand. Could you
> please give me more details?
> 1. Is the slightly dodgy way completely separate from using a shared
Yeah, it's completely separate. The pastie is the complete spec.
This only tests your ApplicationController though.
> 2. What is the appropriate file path and name for your first example
> regarding a shared spec? Is it RAILS_ROOT/spec/controllers/
> 3. Does the event controller spec belong in RAILS_ROOT/spec/
> 4. How do you actually fire off the test? Do I have to call get or
> post inside a do-end block that is attached to it_should_behave_like
> "All controllers"?
> describe EventController do
> it_should_behave_like "All controllers" do
> get 'event1' # just an example action
> 5. Is there any further documentation on it_should_behave_like other
> than the RDoc? It doesn't really say too much.
I haven't actually used shared specs... so if you figure out please
More information about the rspec-users