Sha256: 4d8c87e26f3d2646f1aafc7150b9c351414df6bc262475f6dc9a83513b73932c

Contents?: true

Size: 1.83 KB

Versions: 1

Compression:

Stored size: 1.83 KB

Contents

# The MIT License
# Copyright © 2009 Magnus Bergmark
# 
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
# 
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
# 
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.

require File.dirname(__FILE__) + '/../../spec_helper'

describe "Base plugin" do
  it "should raise error when asked if it's available" do
    lambda {
      GitRemoteMonitor::Notifiers::Base.available?
    }.should raise_error
  end
  
  it "should raise error when its being initialized" do
    lambda {
      GitRemoteMonitor::Notifiers::Base.new
    }.should raise_error
  end
  
  describe "subclass without notification implementation" do
    before(:all) do
      class SubClass < GitRemoteMonitor::Notifiers::Base; def initialize; end; end;
      @instance = SubClass.new
    end
    
    it "should raise error when asked to notify" do
      lambda {
        @instance.send_notification!(mock("Status"))
      }.should raise_error
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
Mange-git-remote-monitor-0.1.2 spec/git_remote_monitor/notifiers/base_spec.rb