Sha256: 5698bb0d343f183acc4e750489d02a72ecbb166d48da5e174ecf82b9214fe9e0

Contents?: true

Size: 1021 Bytes

Versions: 5

Compression:

Stored size: 1021 Bytes

Contents

require 'spec_helper'

require 'gorillib/builder'

module Gorillib::Test       ; end
module Meta::Gorillib::Test ; end

describe Gorillib::Builder, :model_spec => true do
  before do
    require_relative '../../../examples/builder/ironfan.rb'
  end
  after(:each){   Gorillib::Test.nuke_constants ; Meta::Gorillib::Test.nuke_constants }

  def example_cluster
    Gorillib::Test.cluster
  end

  let(:ec_webnode  ){ fac = example_cluster.facet(:webnode); fac.cluster(example_cluster) ; fac }
  let(:ec_webnode_a){ svr = ec_webnode.server(:a);           svr.facet(ec_webnode)        ; svr }

  # it 'is awesome'

  context "collections get a {foo}_name accessor:" do
    it("facet.cluster_name"){ ec_webnode.cluster_name.should == :yellowhat }
    it("server.facet_name" ){ ec_webnode_a.facet_name.should == :webnode   }
  end

  context "collections get a `has_{foo}` tester:" do
    it("server.facet?"    ){ ec_webnode_a.facet?.should be_true }
    it("facet.has_server?"){ ec_webnode.should have_server(:a) }
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
gorillib-0.6.0 spec/examples/builder/ironfan_spec.rb
gorillib-0.5.2 spec/examples/builder/ironfan_spec.rb
gorillib-0.5.0 spec/examples/builder/ironfan_spec.rb
gorillib-0.4.2 spec/examples/builder/ironfan_spec.rb
gorillib-0.4.2pre spec/examples/builder/ironfan_spec.rb