Sha256: 1b28a7b8c6b82f386dc3bc5723c75c2e2aa2b21713389c23bce9d945ce316c6b

Contents?: true

Size: 617 Bytes

Versions: 2

Compression:

Stored size: 617 Bytes

Contents

require File.dirname(__FILE__) + '/../spec_helper'
require 'netzke-core'

describe Netzke::Base do
  it "should keep config independent inside class hierarchy" do
    class Parent < Netzke::Base
      class_attribute :with_feature
      self.with_feature = "yes"
    end

    class Child < Parent; end

    Parent.with_feature.should == "yes"
    Child.with_feature.should == "yes"

    Child.with_feature = "no"

    Parent.with_feature.should == "yes"
    Child.with_feature.should == "no"

    Parent.with_feature = "maybe"
    Parent.with_feature.should == "maybe"
    Child.with_feature.should == "no"
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
netzke-core-0.6.4 spec/component/base_spec.rb
netzke-core-0.6.3 spec/component/base_spec.rb