Module: CouchPotato::RSpec::StubDb

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

Instance Method Summary (collapse)

Instance Method Details

- (Object) stub_db(options = {})



42
43
44
45
46
47
# File 'lib/couch_potato/rspec/stub_db.rb', line 42

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