I'm pretty new to rails, so my recommendations might not be the best. Of 
the two I'd go with rspec, because it gives you the option to use either 
capybara or watir. 

Now whether to go with capybara or watir, I'd say it depends on how complex 
the application is. My impression of capybara is that it's good for getting 
integration tests up and running, but I couldn't see using it for a really 
javascript heavy site or a really complex UI. It seems geared to run as a  
headless browser. Others may find this to not be the case. 

I use watir  <https://github.com/watir> to test a pretty complex 
application. Watir can be run headlessly using phantomjs, and you can also 
have it interact directory with any major browser (Firefox, IE, Chrome, 
Opera, Safari). You could also use the watir gem within rails using 
watir-rails <https://github.com/watir/watir-rails> and 
watir-rspec<https://github.com/watir/watir-rspec>. 
To make things more managable there s a gem call 
page-objects<https://github.com/cheezy/page-object>, 
that allows you create a page element definition library. If you use 
page-objects then you just call that element definition within your spec. 
There's a  Cucumber & Cheese <https://leanpub.com/cucumber_and_cheese>, 
that's about front end integration testing. It uses cucumber as the test 
framework (which i don't recommend unless you really have to), but it has 
useful information about watir, page-objects, and front end testing in 
general. It even goes into database testing.  

I'd probably go the watir/rspec, because you app seems more complex than 
simple crud. 

On Friday, August 2, 2013 12:13:56 PM UTC-7, Benjamin Wanicur wrote:
>
> Hi Everyone
>
> I'm working on a Rails application with a couple of fairly complicated UI 
> pages.  I'm using AngularJS to create a few single pages apps to tackle 
> this complexity.  As this is my first foray into using an MVC JS framework, 
> I have a question about integration testing.
>
> So far my plan is to use rSpec for the Rails unit tests, Jasmine for the 
> JS unit tests, but I am still not 100% sure about how to tackle integration 
> testing.  It seems like there are 2 paths I could take:
>
> Use rSpec ("request" or "feature" tests) for integration testing 
> Use Angular's "e2e" testing tools.
>
> I'm leaning towards using rSpec because it has the advantage of not only 
> testing expectations in the UI but also on backend (DB).  I'd like to hear 
> how other Ruby developers tackled integration testing.  I was surprised not 
> to find too much written about these 2 "paths" of integration testing on 
> the interwebs (or maybe I was doing a poor job of searching).   Thanks in 
> advance!
>

-- 
-- 
SD Ruby mailing list
[email protected]
http://groups.google.com/group/sdruby
--- 
You received this message because you are subscribed to the Google Groups "SD 
Ruby" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to