Mark internal class as private

Minimal doubles should be done.
This commit is contained in:
Michael Miller 2019-10-05 22:06:03 -06:00
parent 00c0553426
commit 47ca96801b
3 changed files with 3 additions and 3 deletions

View file

@ -311,7 +311,7 @@ Items not marked as completed may have partial implementations.
- [ ] Compound - `and`, `or` - [ ] Compound - `and`, `or`
- [ ] Mocks and Doubles - [ ] Mocks and Doubles
- [ ] Mocks (Stub real types) - `mock TYPE { }` - [ ] 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()` - [ ] Method stubs - `allow().to receive()`, `allow().to receive().and_return()`
- [ ] Spies - `expect().to receive()` - [ ] Spies - `expect().to receive()`
- [ ] Message expectations - `expect().to receive().at_least()` - [ ] Message expectations - `expect().to receive().at_least()`

View file

@ -5,7 +5,7 @@ module Spectator
@internal.{{definition.name.id}} @internal.{{definition.name.id}}
end end
class Internal private class Internal
def {{definition.name.id}} def {{definition.name.id}}
{{definition.block.body}} {{definition.block.body}}
end end

View file

@ -6,7 +6,7 @@ module Spectator::DSL
Double{{name.id}}.new(@spectator_test_values) Double{{name.id}}.new(@spectator_test_values)
{% else %} {% else %}
class Double{{name.id}} < ::Spectator::Double class Double{{name.id}} < ::Spectator::Double
class Internal < {{@type.id}} private class Internal < {{@type.id}}
end end
def initialize(test_values : ::Spectator::TestValues) def initialize(test_values : ::Spectator::TestValues)