diff --git a/README.md b/README.md index 7617a01..7218535 100644 --- a/README.md +++ b/README.md @@ -311,7 +311,7 @@ Items not marked as completed may have partial implementations. - [ ] Compound - `and`, `or` - [ ] Mocks and Doubles - [ ] Mocks (Stub real types) - `mock TYPE { }` - - [ ] Doubles (Stand-ins for real types) - `double NAME { }` + - [X] Doubles (Stand-ins for real types) - `double NAME { }` - [ ] Method stubs - `allow().to receive()`, `allow().to receive().and_return()` - [ ] Spies - `expect().to receive()` - [ ] Message expectations - `expect().to receive().at_least()` diff --git a/src/spectator/double.cr b/src/spectator/double.cr index d8aa3c9..2991639 100644 --- a/src/spectator/double.cr +++ b/src/spectator/double.cr @@ -5,7 +5,7 @@ module Spectator @internal.{{definition.name.id}} end - class Internal + private class Internal def {{definition.name.id}} {{definition.block.body}} end diff --git a/src/spectator/dsl/mocks.cr b/src/spectator/dsl/mocks.cr index 7f4519f..18ff002 100644 --- a/src/spectator/dsl/mocks.cr +++ b/src/spectator/dsl/mocks.cr @@ -6,7 +6,7 @@ module Spectator::DSL Double{{name.id}}.new(@spectator_test_values) {% else %} class Double{{name.id}} < ::Spectator::Double - class Internal < {{@type.id}} + private class Internal < {{@type.id}} end def initialize(test_values : ::Spectator::TestValues)