Module: CouchPotato::RSpec::StubView

Defined in:
lib/couch_potato/rspec/stub_db.rb

Defined Under Namespace

Classes: ViewStub

Instance Method Summary (collapse)

Instance Method Details

- (Object) stub_view(clazz, view, &block)



34
35
36
37
38
# File 'lib/couch_potato/rspec/stub_db.rb', line 34

def stub_view(clazz, view, &block)
  stub = ViewStub.new clazz, view, self
  stub.and_return(block.call) if block
  stub
end