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



47
48
49
50
51
# File 'lib/couch_potato/rspec/stub_db.rb', line 47

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