Module: CouchPotato::RSpec::StubDb

Included in:
Spec::Mocks::ExampleMethods
Defined in:
lib/couch_potato/rspec/stub_db.rb

Instance Method Summary collapse

Instance Method Details

#stub_db(options = {}) ⇒ Object



31
32
33
34
35
36
# File 'lib/couch_potato/rspec/stub_db.rb', line 31

def stub_db(options = {})
  db = stub('db', options)
  db.extend CouchPotato::RSpec::StubView
  CouchPotato.stub(:database => db)
  db
end