-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12 from kohkimakimoto/update-test
Update test
- Loading branch information
Showing
13 changed files
with
650 additions
and
151 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,5 +12,3 @@ node_modules/ | |
.envrc | ||
|
||
!.gitkeep | ||
|
||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package inertia | ||
|
||
import ( | ||
"io" | ||
"testing" | ||
) | ||
|
||
type mockRenderer struct { | ||
render func(w io.Writer, name string, data map[string]interface{}, in *Inertia) error | ||
} | ||
|
||
func (r *mockRenderer) Render(w io.Writer, name string, data map[string]interface{}, in *Inertia) error { | ||
return r.render(w, name, data, in) | ||
} | ||
|
||
func testNewMockRenderer(t *testing.T, renderFunc func(w io.Writer, name string, data map[string]interface{}, in *Inertia) error) Renderer { | ||
t.Helper() | ||
|
||
return &mockRenderer{render: renderFunc} | ||
} |
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
Oops, something went wrong.