Sha256: 762b2df1b2d7a67e486c23b0242534ff05a24dda21d3f2cf80868417ed4ee92d

Contents?: true

Size: 559 Bytes

Versions: 14

Compression:

Stored size: 559 Bytes

Contents

require 'spec_helper'
require 'geoff/node_dsl'

describe NodeDsl do
  subject { NodeDsl.new(node_name: 'starbucks') }

  describe '#node_name' do
    context 'in normal (non-test) use of builder' do
      before do
        subject.stub(:object_id).and_return 'egg'
      end

      its(:node_name) { should == 'starbucks_egg' }
    end

    context 'with object_id returning nil to make integration testing easier' do
      before do
        subject.stub(:object_id).and_return nil
      end

      its(:node_name) { should == 'starbucks' }
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
geoff-0.2.6 spec/node_dsl_spec.rb
geoff-0.2.5 spec/node_dsl_spec.rb
geoff-0.2.3 spec/node_dsl_spec.rb
geoff-0.2.2 spec/node_dsl_spec.rb
geoff-0.2.1 spec/node_dsl_spec.rb
geoff-0.2.0 spec/node_dsl_spec.rb
geoff-0.1.2 spec/node_dsl_spec.rb
geoff-0.1.1 spec/node_dsl_spec.rb
geoff-0.1.0 spec/node_dsl_spec.rb
geoff-0.0.8 spec/node_dsl_spec.rb
geoff-0.0.7 spec/node_dsl_spec.rb
geoff-0.0.6 spec/node_dsl_spec.rb
geoff-0.0.5 spec/node_dsl_spec.rb
geoff-0.0.4 spec/node_dsl_spec.rb