Method: JavaMethod::JMockStubMethodWriter#add_nongetter_stub_to
- Defined in:
- lib/java_testing_guff/qdox_extensions.rb
#add_nongetter_stub_to(method_builder) ⇒ Object
395 396 397 398 399 400 401 402 403 404 |
# File 'lib/java_testing_guff/qdox_extensions.rb', line 395 def add_nongetter_stub_to(method_builder) method_builder.body {|body| if (returns_something?) body.line("stubs().method(\"#{name}\").#{jmock_with_clause}.will(returnValue(result));") else body.line("stubs().method(\"#{name}\").#{jmock_with_clause};") end body.line('return (T) this;') } end |