Sha256: ff8813ada0ffc01e83983f8a3e535af61bbb42655da9e6bc50399b90f1f492e1

Contents?: true

Size: 701 Bytes

Versions: 13

Compression:

Stored size: 701 Bytes

Contents

require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')

describe Pupa::Refinements, testing_python_compatibility: true do
  module Music
    class Band
      include Pupa::Model

      def save
        run_callbacks(:save) do
        end
      end
    end
  end

  module Pupa
    class Committee < Organization
      def save
        run_callbacks(:save) do
        end
      end
    end
  end

  it 'should demodulize the type of new models' do
    object = Music::Band.new
    object.save
    object._type.should == 'band'
  end

  it 'should demodulize the type of existing models' do
    object = Pupa::Committee.new
    object.save
    object._type.should == 'committee'
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
pupa-0.1.10 spec/refinements/opencivicdata_spec.rb
pupa-0.1.9 spec/refinements/opencivicdata_spec.rb
pupa-0.1.8 spec/refinements/opencivicdata_spec.rb
pupa-0.1.7 spec/refinements/opencivicdata_spec.rb
pupa-0.1.6 spec/refinements/opencivicdata_spec.rb
pupa-0.1.5 spec/refinements/opencivicdata_spec.rb
pupa-0.1.4 spec/refinements/opencivicdata_spec.rb
pupa-0.1.3 spec/refinements/opencivicdata_spec.rb
pupa-0.1.2 spec/refinements/opencivicdata_spec.rb
pupa-0.1.1 spec/refinements/opencivicdata_spec.rb
pupa-0.1.0 spec/refinements/opencivicdata_spec.rb
pupa-0.0.13 spec/refinements/opencivicdata_spec.rb
pupa-0.0.12 spec/refinements/opencivicdata_spec.rb