Sha256: 063d716601f66e73d6cd5348ab1bff115bdf74df0e214180d267bbfe6fb83ca6

Contents?: true

Size: 661 Bytes

Versions: 10

Compression:

Stored size: 661 Bytes

Contents

require 'spec_helper'

class PlainParent
  class_attribute :foo
  self.foo = :bar
end

class PlainChild < PlainParent
end

class ExtendedParent < CouchRest::Model::Base
  class_attribute :foo
  self.foo = :bar
end

class ExtendedChild < ExtendedParent
end

describe "Using chained inheritance without CouchRest::Model::Base" do
  it "should preserve inheritable attributes" do
    PlainParent.foo.should == :bar
    PlainChild.foo.should == :bar
  end
end

describe "Using chained inheritance with CouchRest::Model::Base" do
  it "should preserve inheritable attributes" do
    ExtendedParent.foo.should == :bar
    ExtendedChild.foo.should == :bar
  end
end


Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
couchrest_model-2.1.0.rc1 spec/unit/inherited_spec.rb
couchrest_model-2.1.0.beta2 spec/unit/inherited_spec.rb
couchrest_model-2.1.0.beta1 spec/unit/inherited_spec.rb
couchrest_model-2.0.4 spec/unit/inherited_spec.rb
couchrest_model-2.0.3 spec/unit/inherited_spec.rb
couchrest_model-2.0.1 spec/unit/inherited_spec.rb
couchrest_model-2.0.0 spec/unit/inherited_spec.rb
couchrest_model-2.0.0.beta2 spec/unit/inherited_spec.rb
couchrest_model-2.0.0.beta spec/unit/inherited_spec.rb
couchrest_model-1.2.0.beta spec/unit/inherited_spec.rb