Sha256: 6da243ccd2f28c937f61ec0cef295d9a85e38e02957b13a7b6a53bfa0f7d07b4

Contents?: true

Size: 538 Bytes

Versions: 2

Compression:

Stored size: 538 Bytes

Contents

module Alerts
  module Macros
    def should_fire_event(event_type, opts = {})
      should "fire #{event_type} on #{opts[:on]}" do
        matcher = fire_event(event_type, opts)

        assert_accepts matcher, self.class.name.gsub(/Test$/, '').constantize
      end
    end

    def should_not_fire_event(event_type, opts = {})
      should "fire #{event_type} on #{opts[:on]}" do
        matcher = fire_event(event_type, opts)

        assert_rejects matcher, self.class.name.gsub(/Test$/, '').constantize
      end
    end

  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
alerts-0.0.2 lib/alerts/macros.rb
alerts-0.0.1 lib/alerts/macros.rb