Update RSpec's Syntax
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
puppet-cinder |
Invalid
|
Medium
|
Soledad Kuczala |
Bug Description
The primary syntax provided by RSpec-expectations is based on the expect method, which explicitly wraps an object or block of code to set an expectation on it.
Currently, the Puppet's cinder-modules use deprecated syntax. [1]
The should-based syntax, which relies upon should being monkey-patched onto every object in the system. However, this syntax can at times lead to some surprising failures, since RSpec does not own every object in the system and cannot guarantee that it will always work consistently. A deprecation warning will be issued if you do not explicitly enable it. [2]
That being said, It's recommended to use the expect syntax instead of the should syntax.[3] We need to update all the cinder-modules to use the primary syntax. [4]
To upgrade to the expect, we can apply transpec[5], which can perform the conversion automatically for us.
[1] https:/
[2] https:/
[3] http://
[4] https:/
[5] https:/
Changed in puppet-cinder: | |
assignee: | nobody → Sofia Enriquez (lsofia-enriquez) |
Changed in puppet-cinder: | |
assignee: | Sofia Enriquez (lsofia-enriquez) → Soledad Kuczala (solkz) |
status: | New → In Progress |
Changed in puppet-cinder: | |
status: | In Progress → New |
Changed in puppet-cinder: | |
status: | New → Confirmed |
Changed in puppet-cinder: | |
status: | Confirmed → In Progress |
Changed in puppet-cinder: | |
status: | In Progress → Invalid |
Sofia, missed your IRC question about bundler. The docs for setting up an env for testing can be found @ https:/ /docs.openstack .org/puppet- openstack- guide/latest/ contributor/ testing. html