You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 30, 2024. It is now read-only.
#!/usr/bin/env rspecRSpec.describe"define some module"domoduleMyModuleendendRSpec.describe"a different example group"doit"should not have module defined"doexpect(defined?(MyModule)).tobe == nilendend
I get the following output
a different example group
should not have module defined (FAILED - 1)
Failures:
1) a different example group should not have module defined
Failure/Error: expect(defined?(MyModule)).to be == nil
expected: == nil
got: "constant"
# ./test.rb:10:in `block (2 levels) in <top (required)>'
Finished in 0.01106 seconds (files took 0.09443 seconds to load)
1 example, 1 failure
Failed examples:
rspec ./test.rb:9 # a different example group should not have module defined
I don't know if this is expected, but it seems odd that constants defined in one example group would leak into another.