Sha256: 361a7f8b4e0d953355c37b77f2b0cefb396879f2fb1f3653934c14833d38ef8d

Contents?: true

Size: 1.17 KB

Versions: 1

Compression:

Stored size: 1.17 KB

Contents

require 'spec_helper'

describe EventedSpec do
  describe "inclusion of helper modules" do
    include EventedSpec::SpecHelper

    it "creates reactor launchers" do
      [:em, :amqp, :coolio].each do |method|
        self.respond_to?(method).must_equal true
      end
    end

    it "adds various helpers" do
      [:done, :timeout, :delayed].each do |method|
        self.must_respond_to method
      end
    end

    it "creates hooks and other group helpers" do
      [:em_before, :em_after, :amqp_before,
       :amqp_after, :coolio_before, :coolio_after,
       :default_timeout, :default_options].each do |method|
        self.class.must_respond_to method
      end
    end

    describe "propagation to sub contexts" do
      it "should work" do
        [:em, :amqp, :coolio].each do |method|
          self.must_respond_to method
        end

        [:done, :timeout, :delayed].each do |method|
          self.must_respond_to method
        end

        [:em_before, :em_after, :amqp_before,
         :amqp_after, :coolio_before, :coolio_after,
         :default_timeout, :default_options].each do |method|
          self.class.must_respond_to method
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
evented-spec-1.0.0.beta1 spec/minitest/basic_integration_minispec.rb