Sha256: 3a9b82f4af0904150f266e0b30910496bd1ce90ed6cac8caac99bc904f060209

Contents?: true

Size: 844 Bytes

Versions: 25

Compression:

Stored size: 844 Bytes

Contents

# require "test_helper"

# class ProcessInlineTest < MiniTest::Spec
#   Album = Struct.new(:artist, :composer, :recursive_composer)

#   module InlineTwin
#   end

#   class RecursiveComposerTwin < Disposable::Twin
#     property :composer, twin: self
#   end

#   class AlbumTwin < Disposable::Twin
#     def self.process_inline!(inline_class, definition)
#       inline_class.send :include, InlineTwin
#     end

#     property :artist do
#     end

#     property :composer, twin: ->{ ComposerTwin }

#     property :recursive_composer, twin: RecursiveComposerTwin
#   end

#   class ComposerTwin < Disposable::Twin
#   end

#   it do
#     twin = AlbumTwin.new(Album.new(Object, Object))
#     assert ! (twin.class < InlineTwin)
#     assert   (twin.artist.class < InlineTwin)
#     assert ! (twin.composer.class < InlineTwin)
#   end
# end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
disposable-0.2.2 test/twin/process_inline_test.rb
disposable-0.2.1 test/twin/process_inline_test.rb
disposable-0.2.0 test/twin/process_inline_test.rb
disposable-0.2.0.rc2 test/twin/process_inline_test.rb
disposable-0.2.0.rc1 test/twin/process_inline_test.rb