fix tests

This commit is contained in:
Dmitriy Zaporozhets 2013-01-03 12:37:12 +02:00
parent d6036f08aa
commit 2095780f24
1 changed files with 3 additions and 3 deletions

View File

@ -1,7 +1,7 @@
require 'spec_helper'
describe KeyObserver do
before do
before do
@key = double('Key',
identifier: 'admin_654654',
key: '== a vaild ssh key',
@ -15,7 +15,7 @@ describe KeyObserver do
)
@observer = KeyObserver.instance
@observer.stub(:git_host => @gitolite)
@observer.stub(gitolite: @gitolite)
end
context :after_save do
@ -25,7 +25,7 @@ describe KeyObserver do
end
end
context :after_destroy do
context :after_destroy do
it do
@gitolite.should_receive(:remove_key).with(@key.identifier, @key.projects)
@observer.after_destroy(@key)