mirror of
https://github.com/drapergem/draper
synced 2023-03-27 23:21:17 -04:00
Fix mock error by following error instructions
Fixes the following error: ``` [WARNING] Could not load generator "generators/test_unit/decorator_generator". Error: Rails::Generators received :require with unexpected arguments expected: ("application_decorator") got: ("generators/test_unit/decorator_generator") Please stub a default value first if message might be received with other args as well ```
This commit is contained in:
parent
0204be12a2
commit
7f8ece627e
1 changed files with 1 additions and 0 deletions
|
@ -40,6 +40,7 @@ describe Rails::Generators::DecoratorGenerator do
|
|||
|
||||
context "with an ApplicationDecorator" do
|
||||
before do
|
||||
allow_any_instance_of(Object).to receive(:require)
|
||||
allow_any_instance_of(Object).to receive(:require).with("application_decorator").and_return(
|
||||
stub_const "ApplicationDecorator", Class.new
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue