gitlab-org--gitlab-foss/spec/features/projects/environments
Yorick Peterse 45812f1cab
Fix Environment terminal specs for EE
In EE we redefine Environment#terminals, which makes it impossible to
use `allow_any_instance_of(Environment)` or
`expect_any_instance_of(Environment)`. Other approaches of stubbing
this class, such as by stubbing `new`, only result in spec failures.

To solve this issue, we add a simple `defined?(EE)` check in the tests
to change the thing that we are testing. This is rather obnoxious,
because it requires EE knowledge in CE, and can break if
`EE::Environment` is removed without updating CE. Unfortunately, it
appears to be the only solution we have apart from modifying these tests
in EE (which would cause merge conflicts).
2018-11-29 09:05:37 +01:00
..
environment_metrics_spec.rb Enable Capybara/FeatureMethods cop 2018-07-05 06:32:05 +00:00
environment_spec.rb Fix Environment terminal specs for EE 2018-11-29 09:05:37 +01:00
environments_spec.rb Revert add action column changes 2018-11-07 14:29:16 +09:00