Skip to content

Allow a new stub to override a match if one exists by passing param#5

Merged
jackfranklin merged 1 commit into
masterfrom
allow-override-with-param
Jun 1, 2015
Merged

Allow a new stub to override a match if one exists by passing param#5
jackfranklin merged 1 commit into
masterfrom
allow-override-with-param

Conversation

@jackfranklin
Copy link
Copy Markdown
Contributor

@maxmurdoch please could you review?

This is useful functionality when we have something that we stub globally in E2E (eg /users) and in a particular test want to stub it with something else. Doing stub.remove({}) and then stub({}) is kind of annoying.

It's useful to have Stubby blow up by default if you try to stub something that already exists but I see no harm in allowing a param to be passed.

Comment thread dist/stubby-bundle.js Outdated
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

could you just check !_.isEmpty here?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Totes

@maxmurdoch
Copy link
Copy Markdown

👍

@jackfranklin jackfranklin force-pushed the allow-override-with-param branch 2 times, most recently from f39f94e to eff84d8 Compare June 1, 2015 10:46
jackfranklin added a commit that referenced this pull request Jun 1, 2015
Allow a new stub to override a match if one exists by passing param
@jackfranklin jackfranklin merged commit 9f8db11 into master Jun 1, 2015
@jackfranklin jackfranklin deleted the allow-override-with-param branch June 1, 2015 10:46
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.

2 participants