Class: CodeDrivenDevelopment::TestComponent::Double
- Inherits:
-
Object
- Object
- CodeDrivenDevelopment::TestComponent::Double
- Defined in:
- lib/code_driven_development/test_component/double.rb
Instance Method Summary collapse
- #indented_output(io) ⇒ Object
-
#initialize(name) ⇒ Double
constructor
A new instance of Double.
Constructor Details
#initialize(name) ⇒ Double
Returns a new instance of Double.
4 5 6 |
# File 'lib/code_driven_development/test_component/double.rb', line 4 def initialize(name) @name = name end |
Instance Method Details
#indented_output(io) ⇒ Object
8 9 10 |
# File 'lib/code_driven_development/test_component/double.rb', line 8 def indented_output(io) io << "let(:#@name) { double(:#@name) }" end |