Fix a backtrace cleaning related spec. #228

Merged
merged 1 commit into from Mar 28, 2013

Conversation

Projects
None yet
2 participants
Owner

samphippen commented Mar 27, 2013

This spec failed when I did a fresh clean of rspec-expectations. It looks like stubbing backtrace_clean_patterns doesn't work now, this seems pretty sensible as these are now delegated to another object. I elected to just assign it in the before block. Is this sensible? Should I stub it on the backtrace cleaner instead?

Owner

myronmarston commented Mar 27, 2013

Generally, I prefer assigning a config option rather than stubbing it, as it is not prone to this kind of problem. So, assigning it as have you done is good.

However, the config options are effectively global -- so when you assign it, you are changing a global value that can affect other specs. Can you add an after hook that resets the changed value to what it originally was?

Fix a backtrace cleaning related spec.
Signed-off-by: Sam Phippen <samphippen@googlemail.com>

myronmarston added a commit that referenced this pull request Mar 28, 2013

@myronmarston myronmarston merged commit 453999e into rspec:master Mar 28, 2013

1 check failed

default The Travis build failed
Details
Owner

myronmarston commented Mar 28, 2013

Thanks, Sam!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment