[rspec-users] RSpec vs Screw.Unit

Scott Taylor mailing_lists at railsnewbie.com
Wed Oct 22 11:38:12 EDT 2008


On Oct 22, 2008, at 9:46 AM, David Chelimsky wrote:

> On Sun, Oct 19, 2008 at 9:44 PM, Scott Taylor
> <mailing_lists at railsnewbie.com> wrote:
>>
>> On Oct 19, 2008, at 12:14 PM, Pat Maddox wrote:
>>
>>> Scott Taylor <mailing_lists at railsnewbie.com> writes:
>>>
>>>> On Oct 18, 2008, at 9:19 AM, Pat Maddox wrote:
>>>>
>>>>> Scott Taylor <mailing_lists at railsnewbie.com> writes:
>>>>>
>>>>>> As for #3, I'm
>>>>>> pretty sure that Ruby's method_missing allows one to raise an
>>>>>> exception easily.  Not sure what a Javascript mocking framework  
>>>>>> would
>>>>>> do in this case.
>>>>>
>>>>> I'm not sure that I buy that this feature is very important.  Both
>>>>> Javascript and Ruby blow up when you call a method that doesn't
>>>>> exist on
>>>>> it anyway.  What's the difference between "Received unexpected  
>>>>> message
>>>>> 'foo'" and "NoMethodError 'foo'"?
>>>>
>>>> Unless I'm mistaken, it's only when *another* method gets called  
>>>> on a
>>>> missing method that an error gets raised:
>>>>
>>>>>>> o = {};
>>>>
>>>> Object
>>>>>>>
>>>>>>> o.foo
>>>
>>> You would need to do o.foo() to actually call the method.  That will
>>> give you "o.foo is undefined"
>>>
>>
>> Oops.  I feel like a tool.  Guess ruby syntax still invades my brain.
>>
>>>
>>>> BTW, Pat - Have you still been working on integrating test spy into
>>>> rspec?
>>>
>>> Nope, I found not_a_mock [1] and it works well.
>>
>>
>> Any plans to roll not_a_mock into rspec core?
>
> No, but if you'd like to submit a patch w/ a wrapper we can add it to
> the list of supported frameworks.

Yeah, I'll do this eventually if no one else does it, although I'll  
probably want to add support for LH #576 first:

http://rspec.lighthouseapp.com/projects/5645/tickets/576-switch-mock-frameworks-at-run-time#ticket-576-1

Scott


More information about the rspec-users mailing list