Module: StubFactory
- Defined in:
- lib/stub_factory.rb
Defined Under Namespace
Modules: ArrayExtensions, StringExtensions Classes: InstanceFactory
Instance Method Summary collapse
Instance Method Details
#factory(klass, options = {}) ⇒ Object
75 76 77 78 79 80 81 |
# File 'lib/stub_factory.rb', line 75 def factory(klass, = {}) _factory = InstanceFactory.new(self, klass, ) define_method(_factory.method_name) do |*args| stubs = args.extend(ArrayExtensions). _factory.with(args).stub!(stubs).result end end |