Use similar interface to access gitolite

Simplified gitolite handle logic
Stubn over monkeypatch
Stub only specific methods in Gitlab:Gitolite
Moved grach auth to lib
added specs for keys observer
removes SshKey role
This commit is contained in:
randx 2012-08-29 00:04:06 +03:00
parent aded7056fd
commit 7cdc5b9e04
20 changed files with 155 additions and 88 deletions

View file

@ -27,6 +27,7 @@ RSpec.configure do |config|
config.mock_with :rspec
config.include LoginHelpers, type: :request
config.include GitoliteStub
# If you're not using ActiveRecord, or you'd prefer not to run each of your
# examples within a transaction, remove the following line or assign false
@ -39,6 +40,8 @@ RSpec.configure do |config|
end
config.before do
stub_gitolite!
# !!! Observers disabled by default in tests
ActiveRecord::Base.observers.disable(:all)
# ActiveRecord::Base.observers.enable(:all)