Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RSpec sane defaults #14

Merged
merged 3 commits into from
Apr 18, 2017
Merged

RSpec sane defaults #14

merged 3 commits into from
Apr 18, 2017

Conversation

damireh
Copy link
Collaborator

@damireh damireh commented Apr 18, 2017

This MR updates RSpec configuration to disable monkey patching and runs the specs in random order

Note Interesting thing I found was that classes defined in before blocks leak into other tests; so had to remove_method calculate in order to make the tests pass

Disable monkey patching and run specs in random order
FooCalculator calculate method was leaking from another test; this
commit removes the calculate method in order to properly test raising an
exception for classes that dont implement calculate.
@marceloboeira
Copy link
Owner

👍

The re-declaration of the class inside the "before" block was causing
the test to fail for a specific order, if the method was already defined
or not, it could cause an error.

Now, every context uses its own class, avoind the problem.
@marceloboeira marceloboeira merged commit e982430 into marceloboeira:master Apr 18, 2017
@marceloboeira marceloboeira deleted the rspec branch April 18, 2017 14:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants