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 -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -