Last active
February 28, 2023 14:35
-
-
Save olivierlacan/73b8a4bb0f229005da8d to your computer and use it in GitHub Desktop.
Climate Control RSpec support helper
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # in spec/support/climate_control.rb | |
| module ClimateControlHelper | |
| def with_modified_env(options, &block) | |
| ClimateControl.modify(options, &block) | |
| end | |
| end | |
| RSpec.configure do |config| | |
| config.include(ClimateControlHelper) | |
| end |
Author
Nice! I made an alternative one: https://gist.github.com/henrik/6549ee48ebff4407b8dc0815f985d90c
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
See https://github.com/thoughtbot/climate_control