Sha256: e8d5672449443cb7ffc345c597cd2ad0222420c58ad77899364b96a29a9a0ee2

Contents?: true

Size: 858 Bytes

Versions: 21

Compression:

Stored size: 858 Bytes

Contents

require 'spec_helper'

describe Hobo::AssetApplicatorRegistry do
  describe "asset_applicators accessor" do
    it "should initialize registry if none exists" do
      Hobo.asset_applicators = nil
      Hobo.asset_applicators.should be_an_instance_of Hobo::AssetApplicatorRegistry
    end

    it "should return registry if exists" do
      Hobo.asset_applicators.register "test" do
        "test"
      end

      Hobo.asset_applicators["test"].should be_an_instance_of Proc
      Hobo.asset_applicators["test"].call.should match "test"
    end
  end

  describe "register" do
    it "should store passed block with pattern" do
      registry = Hobo::AssetApplicatorRegistry.new
      registry.register "abc" do
        "block"
      end

      registry["abc"].should be_an_instance_of Proc
      registry["abc"].call.should match "block"
    end
  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
hobo-inviqa-0.0.15 spec/hobo/asset_applicator_spec.rb
hobo-inviqa-0.0.14 spec/hobo/asset_applicator_spec.rb
hobo-inviqa-0.0.13 spec/hobo/asset_applicator_spec.rb
hobo-inviqa-0.0.11 spec/hobo/asset_applicator_spec.rb
hobo-inviqa-0.0.10 spec/hobo/asset_applicator_spec.rb
hobo-inviqa-0.0.10.pre.rc11 spec/hobo/asset_applicator_spec.rb
hobo-inviqa-0.0.10.pre.rc10 spec/hobo/asset_applicator_spec.rb
hobo-inviqa-0.0.10.pre.rc9 spec/hobo/asset_applicator_spec.rb
hobo-inviqa-0.0.10.pre.rc8 spec/hobo/asset_applicator_spec.rb
hobo-inviqa-0.0.10.pre.rc7 spec/hobo/asset_applicator_spec.rb
hobo-inviqa-0.0.10.pre.rc6 spec/hobo/asset_applicator_spec.rb
hobo-inviqa-0.0.10.pre.rc4 spec/hobo/asset_applicator_spec.rb
hobo-inviqa-0.0.10.pre.rc2 spec/hobo/asset_applicator_spec.rb
hobo-inviqa-0.0.9 spec/hobo/asset_applicator_spec.rb
hobo-inviqa-0.0.9.pre.rc2 spec/hobo/asset_applicator_spec.rb
hobo-inviqa-0.0.9.pre.rc1 spec/hobo/asset_applicator_spec.rb
hobo-inviqa-0.0.9.pre.alpha spec/hobo/asset_applicator_spec.rb
hobo-inviqa-0.0.8 spec/hobo/asset_applicator_spec.rb
hobo-inviqa-0.0.7.pre.rc3 spec/hobo/asset_applicator_spec.rb
hobo-inviqa-0.0.7.pre.rc2 spec/hobo/asset_applicator_spec.rb