Its interesting you just wrote this as right now I found an error where when
vaidations fail on a page, the redirect is broken. My dilemma is that I
could write a cuke test for this, but it really belongs to the controller.
So this is where my blind spot is. I just hate the idea (because I become
compulsive) to write a controller spec for every action and redirect, as
many of these are role dependent too. I guess I have yet still to find a
happy medium.

On Sun, Oct 10, 2010 at 1:17 PM, [email protected] <
[email protected]> wrote:

> i am having some issues around ruby-debug and rspec for rails3 so i
> was doing a google search for a solution and came across this thread.
> i'm sorry I couldn't miss your thoughts on rppec vs cucumber and don't
> wanna play smarty pants here, i just think you cannot replace rppec
> with cucumber because they are different tools really for different
> purposes.
>
> i am also using cucumber for testing my projects' integrity - hence
> cucumber is for integration testing! - but also not lazy to write
> specs for my controller tests. i found that writing unit tests with
> rspec helps a lot while your project codebase grows and allows you to
> identify failing scenarios much easier. i am also trying to be as
> explicit in my tests as i can, covering edge cases etc.
>
> i would not use rspec with integrated views - never been a big fan of
> that - but would definitely keep writing unit tests with rspec2 and
> cover integration testing with cucumber.
>
> -- Attila
>
> On Sep 13, 6:49 pm, Marnen Laibow-Koser <[email protected]> wrote:
> > David Kahn wrote:
> > > Ok, now I found if I add   *require 'ruby-debug'*   in the spec itself
> > > the
> > > debugger invokes. However....
> >
> > > It is useless. I get a breakpoint in my controller but have no access
> to
> > > anything I want:
> >
> > >
> ../Users/DK/Documents/ror/projects/wavelineup3/app/controllers/user_session
> s_controller.rb:14
> > > respond_to do |format|
> > > (rdb:1) @user_session
> > > *** Unknown command: "@user_session".  Try "help".
> > > (rdb:1) self
> > > *** Unknown command: "self".  Try "help".
> > > (rdb:1) params
> > > *** Unknown command: "params".  Try "help".
> > > (rdb:1)
> >
> > Perhaps auto-eval is turned off in the debugger.  Try typing "p
> > @user_session" instead of "@user_session".
> >
> > And why are you using RSpec specs for your controllers, anyway?
> > Cucumber stories are better for that.  RSpec is better for model logic.
> >
> >
> >
> > > So, how does one go about debugging their tests, or rather specs, in
> > > rspec?
> >
> > Best,
> > --
> > Marnen Laibow-Koserhttp://www.marnen.org
> > [email protected]
> > --
> > Posted viahttp://www.ruby-forum.com/.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ruby on Rails: Talk" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<rubyonrails-talk%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/rubyonrails-talk?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to