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

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

asp.net mvc - How to attach sql database to a javascript graph -

c# - How to know the number of Threads created and limit the Tasks accordingly -