common libs go into the lib/common directory
This commit is contained in:
27
spec/lib/common/updater/updater_spec.rb
Normal file
27
spec/lib/common/updater/updater_spec.rb
Normal file
@@ -0,0 +1,27 @@
|
||||
# encoding: UTF-8
|
||||
|
||||
require 'spec_helper'
|
||||
|
||||
describe Updater do
|
||||
|
||||
before :all do
|
||||
class TestUpdater < Updater
|
||||
end
|
||||
end
|
||||
|
||||
after :all do
|
||||
Object.send(:remove_const, :TestUpdater)
|
||||
end
|
||||
|
||||
describe 'non implementation of #is_installed?, #has_update? and #update' do
|
||||
it 'should raise errors' do
|
||||
test_updater = TestUpdater.new
|
||||
methods_to_call = [:is_installed?, :update, :local_revision_number]
|
||||
|
||||
methods_to_call.each do |method_to_call|
|
||||
expect { test_updater.send(method_to_call) }.to raise_error(NotImplementedError)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
Reference in New Issue
Block a user