[Rspec-devel] Rails controller testing/view testing
luke at agileevolved.com
Sat Jul 8 15:25:05 EDT 2006
> == Integration ==
> I'd prefer to use in-browser testing using Watir/Sahi/Selenium rather
> than Rails' integration testing approach. -Even if we could do it with
> RSpec. -But we should support Rails integration testing with RSpec too
> - other people might prefer that over in-browser testing.
Agreed. In fact, I've always found it strange how Rails refers to
controller tests as "functional" tests when in essence they are unit
tests for your controllers and that is all. I'd like to be able to
spec out my controller actions under their various contexts to test
they work at the code level, which is what I currently do using
Test::Unit (in a BDD-fashion).
When it comes to proper functional/acceptance testing I also agree
that Watir/Selenium are the better approach to take as you can test
worth rSpec trying to tackle this problem.
> This looks *very* interesting. In fact, I'd like to explore whether we
> should support hpricot out of the RSpec box and ditch an
> assert_tag-equivalent approach altogether.
> Would you be willing to donate your hpriocot wrapper to RSpec under
> our BSD licence?
> I can help integrate it more tightly with the RSpec innards.
Definately. I chose the MIT license because thats what Rails uses but
its virtually the same as the BSD license. It would be great to see
it rolled into rSpec and playing nicely with the should_* expectations.
More information about the Rspec-devel