Sha256: 8fa3ce2afa1aaf9fde66786413a3ab9b830dcdb9f910af3a1223fbef20897151

Contents?: true

Size: 717 Bytes

Versions: 1

Compression:

Stored size: 717 Bytes

Contents

require File.expand_path('../../spec_helper', __FILE__)

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

class PlainChild < PlainParent
end

class ExtendedParent < CouchRest::Model::Base
  class_inheritable_accessor :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

1 entries across 1 versions & 1 rubygems

Version Path
couchrest_model-1.1.0.rc1 spec/couchrest/inherited_spec.rb