-
-
Notifications
You must be signed in to change notification settings - Fork 358
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Provide a default value (Mock.new) for stub_const.
Currently you are required to provide a value for the stubbed constant, but there are times that I don't actually care what it is because I'm just going to stub the usage of the constant anyhow. For example: ```ruby stub_const('DeathStar', stub) Starship.stub(:status) { :operational } ``` This allows you to ```ruby stub_const('DeathStar') Starship.stub(:status) { :operational } # or stub_const('DeathStar').stub(:status) { :operational } ```
- Loading branch information
1 parent
f36ad4d
commit 9b827a7
Showing
4 changed files
with
33 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters