Technologies

Shaun McDonald shaun at shaunmcdonald.me.uk
Fri Aug 31 14:28:10 BST 2012


On 31 Aug 2012, at 10:31, Andy Allan <gravitystorm at gmail.com> wrote:

> On 30 August 2012 22:49, Tom Hughes <tom at compton.nu> wrote:
>> I commented in one of the pull requests I merged a few days ago that I had
>> chosen not to merge a commit that added some tests because it introduced
>> some new testing technology and I thought we should discuss that before
>> making a decision.
> 
> It's a long time since I've looked at the rails-port tests. There's a
> lot of things I'd like to change, but I'm wary about changing for
> change's sake - given that I know how long it took Shaun to write most
> of them originally, and that I'm unlikely to be spending a similar
> amount of time to re-implement things! So take what I say with a pinch
> of salt.
> 
>> The specific technology in question was the capybara testing framework along
>> with the selenium driver.
>> 
>> Personally I don't see any problem with capybara, though maybe some of the
>> other rails people (Shaun? Andy?) here have preferences for something else?
> 
> I use capybara for testing pages, I don't have any issues with that. I
> don't, however, use any of the javascript drivers, so I can't comment
> on selenium vs webkit. When I've tried getting selenium working
> before, it's been a bit of a nightmare.

selenium is quite difficult to get working, though does give the advantage of being able to test the js on many browsers, though I'm not sure how best to test that the maps have loaded correctly.

Webkit is more reliable in getting working, though a year or two ago I came across and issue where someone in the team couldn't get it to work.

The browser based testing technology is quite fast moving, though I think the technology choices are starting to settle down compared to a couple of years ago.

> 
>> Anyway, my more general question is what thoughts any of the rails experts
>> here have on what new technologies we should be considering employing if
>> any...
>> 
>> That includes both things like testing tools, which I know Shaun has
>> expressed opinions about in the past, and things like alternative template
>> languages - I think Andy has suggested HAML in the past for example.
> 
> Yep, in summary:
> 
> * FactoryGirl as a replacement for fixtures
+1 this will also speed the tests up.

> * shoulda-matchers
No opinion

> * rspec instead of test::unit, but I doubt it's actually worth the hassle.
Doesn't make much difference. It's just a different way of doing things. test::unit is supposed to be slightly more efficient as it doesn't use the missing_method stuff. I wouldn't say it's worth the change.

> * haml instead of erb
+1

> * devise
> * declarative_authorization instead of scattered authorisation around
> controller actions
+1 it does take a bit to get your head around that way of doing things, however makes things much more consistent.

Shaun

> 
> Cheers,
> Andy
> 
> _______________________________________________
> rails-dev mailing list
> rails-dev at openstreetmap.org
> http://lists.openstreetmap.org/listinfo/rails-dev




More information about the rails-dev mailing list