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

>       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?

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

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

HTH,
David
_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to