Commit 2095780f authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

fix tests

parent d6036f08
require 'spec_helper' require 'spec_helper'
describe KeyObserver do describe KeyObserver do
before do before do
@key = double('Key', @key = double('Key',
identifier: 'admin_654654', identifier: 'admin_654654',
key: '== a vaild ssh key', key: '== a vaild ssh key',
...@@ -15,7 +15,7 @@ describe KeyObserver do ...@@ -15,7 +15,7 @@ describe KeyObserver do
) )
@observer = KeyObserver.instance @observer = KeyObserver.instance
@observer.stub(:git_host => @gitolite) @observer.stub(gitolite: @gitolite)
end end
context :after_save do context :after_save do
...@@ -25,7 +25,7 @@ describe KeyObserver do ...@@ -25,7 +25,7 @@ describe KeyObserver do
end end
end end
context :after_destroy do context :after_destroy do
it do it do
@gitolite.should_receive(:remove_key).with(@key.identifier, @key.projects) @gitolite.should_receive(:remove_key).with(@key.identifier, @key.projects)
@observer.after_destroy(@key) @observer.after_destroy(@key)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment