.size.should === (4..5)

Hi,

I would like to test whether an array size is either of two integer
obejects

mark_up_parser.sorted_xml.size.should === (4…5)

However I am recieiving an exception of:

expected: 4…5,
got: 4 (using ===)

Do I need to write a custom matcher?

Thanks

Aidy

On Apr 28, 2010, at 12:53 PM, aidy lewis wrote:

Do I need to write a custom matcher?

To phrase it like that, yes. You could to this now:

[4,5].should include(obj.size)

HTH,
David

On 28 April 2010 19:01, David C. [email protected] wrote:

To phrase it like that, yes. You could to this now:

[4,5].should include(obj.size)

Nice

HTH,
David

Thanks

Aidy