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

#stub_db(options = {}) ⇒ Object



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