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

Delete instances of Parrot after each test. #14332

Merged
merged 1 commit into from
Mar 10, 2014

Conversation

tgxworld
Copy link
Contributor

@tgxworld tgxworld commented Mar 9, 2014

Given that Parrot instances has been created
When the test has been run
Then all instances of Parrot should be deleted

@tgxworld
Copy link
Contributor Author

tgxworld commented Mar 9, 2014

@senny For your review. Thanks! I'll squash the commits once the review is done :)

@ship.delete
@pirate.delete
super
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I noticed that we were overriding the method teardown in ActiveRecord::TestCase where SQLCounter.clear_log is called.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probably best to use the teardown helper method like so:

teardown do
# ...
end

This won't overwrite the normal teardown method and we can't forget to call super.

@senny
Copy link
Member

senny commented Mar 9, 2014

Please do squash the commits. You can always make further review changes using git commit --amend and git push -f afterwards.

@senny senny self-assigned this Mar 9, 2014
@tgxworld
Copy link
Contributor Author

tgxworld commented Mar 9, 2014

Ok no problem. I wanted to show the commits first so that it will show the reviewer what I'm doing before squashing them.

@tgxworld
Copy link
Contributor Author

tgxworld commented Mar 9, 2014

@senny Updated :)

@senny
Copy link
Member

senny commented Mar 10, 2014

awesome! Thanks @tgxworld for your contribution 💛

senny added a commit that referenced this pull request Mar 10, 2014
Delete instances of Parrot after each test.
@senny senny merged commit ed9a69a into rails:master Mar 10, 2014
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

3 participants