alces-software / metalware

Tools and conventions for improving bare metal machine management
Other
2 stars 0 forks source link

Make test helper functions available in all tests #451

Closed bobwhitelock closed 5 years ago

bobwhitelock commented 5 years ago

Use RSpec's config.include feature (https://relishapp.com/rspec/rspec-core/docs/helper-methods/define-helper-methods-in-a-module#include-a-module-in-all-example-groups) to make our SpecUtils helper functions be available in all tests.

This means calls to these functions no longer need to pass in the current example group (when we want to use RSpec assertions etc. within these), and makes defining these functions simpler; in turn this should make it simpler to extract shared behaviour across test files.

Going to merge this straight through once CI passes, but feel free to comment.