Also, what's becoming REALLY bothersome (I must not full understand or
something) is that my tests keep failing, but testing things with
rails server works fine! :(((
On Dec 25, 11:18 pm, daze <dmonopol...@gmail.com> wrote:
> Alright. Here's one roadblock.
> So what I understand w/BDD is that I should write all these tests,
> watch them fail, and then code to make the tests pass. But the error
> messages I get from running tests don't provide as much insight as
> doing "rails server" and then seeing whatever error comes up... I
> don't understand how people do this.
>
> On Dec 25, 10:05 pm, Marnen Laibow-Koser <li...@ruby-forum.com> wrote:
>
>
>
> > daze wrote in post #970685:
> > [...]
>
> > > With regard to the idea about testing behavior alone:
>
> > > That makes a lot of sense. A lot. My question, however, is about how
> > > there must be a line to draw. If you were to test that the view has
> > > the content you want, wouldn't you HAVE to be testing implementation
> > > to an extent, as your view contains tags like e.g. <div class='span-5'
> > > id='main'>, and you'd be testing for e.g. a div with id 'main'?
>
> > Yes. That's not implementation in the sense that the user actually
> > *sees* it.
>
> > > It's
> > > just not clear to me how...
>
> > What part isn't clear?
>
> > >> (...) You should ideally be able
> > >> to change
> > >> your whole implementation and still have all your tests pass.
>
> > > Could you elaborate, maybe?
>
> > What do you need elaborated?
>
> > > Also, as I'm just getting started
> > > testing, I guess it's good to know now: Is it okay to use Shoulda and
> > > factory_girl_rails to handle all my testing? Or is rspec / cucumber
> > > absolutely necessary? (I don't feel like changing .... but I guess I
> > > need to know)
>
> > Use RSpec (or Shoulda) to test your models. Use Cucumber to test
> > user-facing behavior (don't bother with controller specs). Use Factory
> > Girl everywhere (Pickle helps it talk to Cucumber).
>
> > Best,
> > --
> > Marnen Laibow-Koserhttp://www.marnen.org
> > mar...@marnen.org
>
> > Sent from my iPhone
>
> > --
> > 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 rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
No comments:
Post a Comment