On Mon, Dec 7, 2009 at 5:32 AM, Amit Kulkarni <li...@ruby-forum.com> wrote:

> Hi David,
> I have some query regarding running spec command.
> When i tried to run normal testcase by command "spec
> test_controller_spec.rb"
> then that particular test case runs but the routing testcase fails.
>
> Now if i run through the command "spec
> spec/controllers/test_controller_spec.rb" then all the spec runs
> including the routing spec.
>
> Can you tell me why is this happening?
>

rspec-rails creates different ExampleGroup subclasses for each type of spec
(model, view, controller, helper). It knows which type to create based on
the presence of "spec/controllers" (in this case) in the file's runtime
path, so you need to run specs from the project root in order for rspec to
make this determination.

HTH,
David
_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to