gds-operations/vcloud-tools-tester — pull request #19 by ajlanghorn (2014-07-15 12:41:52+00:00)
Title: [#74863398] Extract fixture parameters regardless of class

The `vcloud-tools-tester` Gem create two test networks - one routed, one
isolated. A pre-existing network is of the `Fog::Compute::VcloudDirector::Network`
class, whereas a network that is created by this Gem is of the
`Vcloud::Core::OrgVdcNetwork` class. Both classes will return the ID and the name
- which are the values required for the fixture parameter extraction.

Any time a new network is created by this Gem, the tests fail and complain
that no fixture parameters were received. We can't get the fixture
parameters because we only extract them if they are of one particular class,
not of either.

Ruby allows for case statements to take multiple values in the `when`
statement. If any of these values is true, the script continues. If not, it
errors. Rather than using `or`, the syntax makes use of a comma to specify
multiple values of equal weighting in the `or`. `,` is the equivalent of `||`
in an `if` statement.

The net result of this commit is that we are placing `or` logic in to the
case statement to extract the fixture parameters when the class is either of
the two values specified.