alphagov/vcloud-core — pull request #66 by mattbostock (2014-05-28 15:51:27+00:00)
Title: [#70499746] Add integration tests for Core::EdgeGateway

Repurpose the existing integration test and add new integration tests for the Vcloud::Core::EdgeGateway class, covering:

- EdgeGateway#get_by_name
- EdgeGateway#get_ids_by_name
- EdgeGateway.vcloud_attributes
- EdgeGateway.name
- EdgeGateway.href
- EdgeGateway.interfaces

I'm raising this PR mostly for review/discussion at this point because:

- I initially added individual tests for load balancers (4e131b5) and NAT (b8de809) before realising that this was testing too much within vCloud Core; as a result I simplified the tests in 06e114e. I think it's probably best to rebase these commits to keep the history clean.

- I've used `let` [explicitly](https://github.com/alphagov/vcloud-core/compare/70499746-integration_tests?expand=1#diff-5e924223f3979c12f93f1d401988c61dR12) for `@test_data` parameters as they are needed, and tried to restrict their scope to the appropriate `describe` or `context` block. I'm not sure if this is necessary and whether to use `let` or just refer directly to `@test_data.` in the tests.

- There wasn't any setup or tear down for the existing integration tests (see [#67916012](https://www.pivotaltracker.com/story/show/67916012) in Pivotal). I think the setup/teardown should be part of this story but in a separate PR?