Sha256: 8f4e0d1f310c38c107b80d6ec9410c13610604243b6b365085819318766e8444

Contents?: true

Size: 700 Bytes

Versions: 3

Compression:

Stored size: 700 Bytes

Contents

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

describe Blueprints::Namespace do
  before do
    mock = @mock

    old_root = Blueprints::Namespace.root
    @namespace = Blueprints::Namespace.root = Blueprints::Namespace.new(:namespace)
    Blueprints::Blueprint.new(:blueprint1, __FILE__) { mock }
    Blueprints::Blueprint.new(:blueprint2, __FILE__) { mock }
    Blueprints::Namespace.root = old_root

    Blueprints::Blueprint.new(:outside_namespace, __FILE__) { mock }
    Blueprints::Namespace.root.build :namespace
  end

  describe "demolish" do
    it "should allow to demolish namespace" do
      @mock.expects(:destroy).twice
      @namespace.demolish
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
blueprints-0.8.2 spec/unit/namespace_spec.rb
blueprints-0.8.1 spec/unit/namespace_spec.rb
blueprints-0.8.0 spec/unit/namespace_spec.rb