Skip to content

Commit 5013d96

Browse files
committed
merge tweaks in 13
1 parent ff146a9 commit 5013d96

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

chapter_13_dependency_injection.asciidoc

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -989,8 +989,6 @@ def test_out_of_stock_email(bus):
989989
And that's it really.
990990

991991

992-
=== Wrap-up
993-
994992
[role="less_space nobreakinside"]
995993
.Exercise for the Reader 2
996994
******************************************************************************
@@ -1009,24 +1007,24 @@ You could do two things ((("adapters", "exercise for the reader")))for practice
10091007

10101008
=== Wrap-Up
10111009

1012-
Once you have more than one adapter, you'll start to feel a lot of pain
1010+
* Once you have more than one adapter, you'll start to feel a lot of pain
10131011
from passing dependencies around((("bootstrapping", "dependency injection and bootstrap recap")))((("dependency injection", "recap of DI and bootstrap"))) manually, unless you do some kind of
10141012
_dependency injection._
10151013

1016-
Setting up dependency injection is just one of many typical
1014+
* Setting up dependency injection is just one of many typical
10171015
setup/initialization activities that you need to do just once when starting
10181016
your app. Putting this all together into a _bootstrap script_ is often a
10191017
good idea.
10201018

1021-
The bootstrap script is also good as a place to provide sensible default
1019+
* The bootstrap script is also good as a place to provide sensible default
10221020
configuration for your adapters, and as a single place to override those
10231021
adapters with fakes for your tests.
10241022

1025-
A dependency injection framework can be useful if you find yourself
1023+
* A dependency injection framework can be useful if you find yourself
10261024
needing to do DI at multiple levels—if you have chained dependencies
10271025
of components that all need DI, for example.
10281026

1029-
This chapter also presented a worked example of changing an implicit/simple
1027+
* This chapter also presented a worked example of changing an implicit/simple
10301028
dependency into a "proper" adapter, factoring out an ABC, defining its real
10311029
and fake implementations, and thinking through integration testing.
10321030

@@ -1041,9 +1039,10 @@ In summary:
10411039
4. Find a less fake version you can put into your Docker environment.
10421040
5. Test the less fake "real" thing.
10431041
6. Profit!((("adapters", "defining adapter and doing dependency injection for it", startref="ix_adapDI")))
1042+
1043+
// TODO this isn't really in the right TDD order is it?
10441044
****
10451045

10461046
These were the last patterns we wanted to cover, which brings us to the end of <<part2>>. In <<epilogue_1_how_to_get_there_from_here, the epilogue>>, we'll try to give you some pointers for applying these techniques in the Real World^TM^.
1047-
// TODO this isn't really in the right TDD order is it?
10481047

10491048
// TODO: tradeoffs?

0 commit comments

Comments
 (0)