ruby - rspec - matcher for one of choices -
I'm returning a random value from the predefined array (i.e .:: ['value1', 'value2'] < / Code>). How should I test with RSPC?
I want to do something like this:
Hope (FooClass.new.value). Be_in ['value1' 'Value2']
Is there any way to do this? Thanks
Use it
Hope (['value1', 'Value2']). To include (FooClass.new.value)
or a simple boolean match
Hopefully (['value1', 'value2']. FooClass.new.value) Be true
Comments
Post a Comment