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

#stub_view(clazz, view, &block) ⇒ Object



36
37
38
39
40
# File 'lib/couch_potato/rspec/stub_db.rb', line 36

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