On 28/01/2010, at 2:48 PM, Julio Cesar Ody wrote:

> For anyone who's curious, here's what I've ended up with thus far:  I'm using 
> Watchr to watch the appropriate files for JS testing. Now, I'm using a js 
> library that causes env.js to barf when it tries to run the file in its 
> headless browser (Strophe.js), so I've resorted to just having Watchr call 
> `open test/javascript/fixtures/#{test}.html -a /Applications/Firefox.app -g`  
> to automatically open the right blueridge fixture file as-needed.  I end up 
> with a ton of Firefox tabs, since each open call makes a new tab appear in 
> FF, but at least the new tab gets focus and I can see at a glance if I'm red 
> or green, as long as I keep the FF window partially visible.  
> 
> It's a total hack, but that's where i'm at for now...

I made this arrangement slightly more bearable by patching ScrewUnit to change 
the window title to "PASS/FAIL: <original title>" so with 10+ tabs you could 
actually tell what was going on.

I also experimented with automatically closing tabs that had passed, thus 
leaving only failed tabs.

The title changing part of the patch is here for inspiration (it's an oldish 
version of ScrewUnit so I don't guarantee it's correctness on the latest 
version and it's missing the window closing functionality):

http://github.com/joshprice/coconut/commits/master/spec/lib/screw.behaviors.js

Eventually though you're going to want to report this back to your build using 
*actual* browser tests (since the emulated DOM in blueridge won't always work). 
I've done this using Selenium on a previous project, but it seems like overkill 
IMHO. 

The best solution I can envisage is a super tiny web-server (Sinatra, etc) 
receiving test results from pages as they pass or fail, and reporting this back 
to the build process.

Josh

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
or Rails Oceania" group.
To post to this group, send email to rails-ocea...@googlegroups.com.
To unsubscribe from this group, send email to 
rails-oceania+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rails-oceania?hl=en.

Reply via email to