Top Level Namespace

Defined Under Namespace

Modules: WB Classes: Categorization, Category, Comment, Contact, ContactList, CreateStuff, Dog, DogToy, Film, GDBMTest, Kino, Notification, Post, Recenzja, Sesja, SimpleMailer, TestContacts, Toy, Xs

Constant Summary collapse

DB =
"http://127.0.0.1:5984/blog"

Instance Method Summary collapse

Instance Method Details

#transactional_specs(rspec_config) ⇒ Object



1
2
3
4
5
6
7
8
9
10
11
# File 'lib/public/doc/activerecord/datamapper_spec_helper.rb', line 1

def transactional_specs rspec_config
  rspec_config.before do
    @_spec_transaction = DataMapper::Transaction.new DataMapper.repository(:default).adapter
    @_spec_transaction.begin
    DataMapper.repository(:default).adapter.push_transaction @_spec_transaction
  end
  rspec_config.after do
    DataMapper.repository(:default).adapter.pop_transaction
    @_spec_transaction.rollback
  end
end