[rspec-users] RSpec vs Screw.Unit
Scott Taylor
mailing_lists at railsnewbie.com
Sat Oct 18 15:12:47 EDT 2008
On Oct 18, 2008, at 10:30 AM, Stephen Eley wrote:
> On Sat, Oct 18, 2008 at 12:53 AM, Scott Taylor
> <mailing_lists at railsnewbie.com> wrote:
>>
>> In Javascript, it might look more or less like this:
>>
>> var old_method = obj[my_method];
>> my_obj[my_method] = my_return_value;
>
> That's an interesting syntax comparison, thanks, but not really what I
> was reacting to. The statement of import (with emphasis added) was
> ""The dynamic nature of JavaScript makes mocking frameworks MOSTLY
> UNNECESSARY."
>
> This doesn't imply a simpler mocking framework, as you describe. It
> implies a fundamental mindshift in how testing gets done.
AH - that's interesting. I didn't take it as any sort of mindshift in
testing. I thought that README/blogpost was simply saying that a mock
framework is unnecessary because the syntax is so easy. But only
*mostly* unnecessary, because either 1) there will be times where
you'll need to tear things down, AND/OR 2) You could build a tiny stub/
mock framework around this stuff very easily for small syntactical
gains.
Interesting idea, though, and maybe it does cause a mindshift in
testing.
Scott
More information about the rspec-users
mailing list