Open vinzent opened 7 years ago
I suppose the specs could use a look-over, but the purpose of the before/after all blocks is to set up some state in the system for the module to act on, and then clean it up after the set of tests is done.
So what would be a valid replacement for the after(:all)
statements?
I mean, before(:all)
can be replaced by before_all
from the Ruby Tests Profiling Toolbox, but there is not any after_all
to replace the after(:all)
of the test code suite.
new error with rubocop-rspec 1.12:
comment on IRC:
the spec's not well-structured.. it has multiple "it" blocks (examples) that rely on the state set by a previous example, e.g. one example calls result.exit_code, the next runs a check, then after(:all) resets the system state.
probably best to move the shell() checks into the same it {} block that actually runs the test, or have the test re-run in each it {} block (rather unnecessary)