Sha256: 4716d1c473280c8895ebb539f91adfba8a8b6f775dc40521261410a896be74d0

Contents?: true

Size: 869 Bytes

Versions: 2

Compression:

Stored size: 869 Bytes

Contents

require 'spec_helper'

class CupcakinatorSpecFoo
  include Cupcakinator

  cupcakinate method: 'config', file: 'config.yml'
end

class CupcakinatorSpecBar < CupcakinatorSpecFoo
  cupcakinate method: 'bar_config'
end

class CupcakinatorSpecBaz
  include Cupcakinator

  cupcakinate method: 'baz_config'
end


describe Cupcakinator do

  context 'inheritence' do

    it "parent should not have child's options" do
      CupcakinatorSpecFoo._cupcakinator_options[:method].should == 'config'
    end

    it "child should not have parent's options" do
      CupcakinatorSpecBar._cupcakinator_options[:method].should == 'bar_config'
    end

  end


  context 'multiple uses' do

    it "should exist separately per invocation" do
      CupcakinatorSpecBaz._cupcakinator_options[:method].should_not eq CupcakinatorSpecFoo._cupcakinator_options[:method]
    end

  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
cupcakinator-0.0.4 spec/cupcakinator_spec.rb
cupcakinator-0.0.2 spec/cupcakinator_spec.rb