Hi Koz,
I'm not sure if that is the best approach. Choosing a default is not
about choosing the winner. Is Test/Unit the winner over Rspec? Different
people will have different opinions about the winner. But they don't
complain about Rspec not being the default one. Nor Rspec lost its momentum.
People currently using Jasmine will probably still use Jasmine if
another default is chosen.
This is about making a point about the importance of Javascript testing
in web applications to Rails developers and make it easy for them to
write their tests without needing to reading about lots of Javascript
test frameworks, picking one and start to use it.
Most will be too lazy for that and won't write any Javascript test at
all. Choosing a default will increase the chances they are going to test
their JS while those who like to search for alternatives will continue
to look at other approaches. I wouldn't say the Rspec community is small
because it is not the default framework. It could be bigger if it was
the default, but it is still big not being the default one.
Regarding the "clean winner", I've only heard about Jasmine in this
discussion, except for 2 votes for evergreen. And I think all of them
will be happy with either is chosen.
I just think that it is a bit strange to deliver a framework that will
promote, by default, TDD for Ruby and BDD for Javascript... It would be
more consistent if the default JS test library used assertions too
instead of specs. Although I prefer evergreen or Jasmine, maybe
something like SinonJS would be more aligned to Test/Unit:
http://sinonjs.org/
Regarding jQuery, I don't really know why it took that long for it
becoming the default. It didn't need to.
It shouldn't be that complicated for changing the defaults each major
release of Rails...
Whenever a better alternative comes up, why shouldn't us adopt as default?
That's the main difference between the Ruby and the other communities in
my opinion... We're not afraid of changes... At least, not me.
Cheers,
Rodrigo.
Em 01-09-2011 18:40, Michael Koziarski escreveu:
On Friday, 2 September 2011 at 9:23 AM, Trek Glowacki wrote:
I think the appropriate question to ask is "of Rails developers unit
testing their javascript, who is *not* using Jasmine"
I definitely get the impression that
* most people are not unit testing their javascript application code,
instead relying on integration tests to catch errors
* among those who do, jasmine is the most frequently used.
I happen to use Jasmine, but I'm not particuarly wild about it. I'd
be interested in what over people use, but I suspect Jasmine is it.
Although there are a *lot* of javascript testing libraries, there
isn't much consensus among javascripters which one(s) to use. As a
result, they all suffer from the lack of support and tooling. Each
library seems to be missing key features. Major framework support of
one of them (Jasmine or not) would hopefully catapult one to the
forefront.
+1 for any damn thing.
Until there's a clear winner I don't think there's much point us
'picking a winner'. As you say, being included in rails will likely
provide a lot of momentum to whatever was picked and I'd prefer that
that momentum was added to something which had already proven it was
head and shoulders above the rest. There are sufficient hooks for gems
to implement the generators and rake tasks as required, so i think we
don't need to hastily include the flavor of the month when it's still
changing so regularly.
Remember, it took us till 3.1 to switch to jQuery by default. Some
caution in a project of our size is warranted. Once everyone in the
JS testing camp is pushing the same tech, we can see what, if
anything, we need to bake into rails itself.
--
Cheers,
Koz
--
You received this message because you are subscribed to the Google Groups "Ruby on
Rails: Core" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/rubyonrails-core?hl=en.