Sha256: c3e2a9eac4f80fd51c58798a8f0c96ca4deb85d36aead4cd4e8b219cecebc979
Contents?: true
Size: 947 Bytes
Versions: 6
Compression:
Stored size: 947 Bytes
Contents
require "spec_helper" describe UniformNotifier::Raise do it "should not notify message" do UniformNotifier::Raise.out_of_channel_notify(:title => "notification").should be_nil end it "should raise error of the default class" do UniformNotifier.raise = true expect { UniformNotifier::Raise.out_of_channel_notify(:title => "notification") }.to raise_error(UniformNotifier::Exception, "notification") end it "allows the user to override the default exception class" do klass = Class.new(Exception) UniformNotifier.raise = klass expect { UniformNotifier::Raise.out_of_channel_notify(:title => "notification") }.to raise_error(klass, "notification") end it "can be turned from on to off again" do UniformNotifier.raise = true UniformNotifier.raise = false expect { UniformNotifier::Raise.out_of_channel_notify(:title => "notification") }.not_to raise_error end end
Version data entries
6 entries across 6 versions & 1 rubygems