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.6.3 test/twin/process_inline_test.rb
disposable-0.6.2 test/twin/process_inline_test.rb
disposable-0.6.1 test/twin/process_inline_test.rb
disposable-0.6.0 test/twin/process_inline_test.rb
disposable-0.5.0 test/twin/process_inline_test.rb
disposable-0.4.7 test/twin/process_inline_test.rb
disposable-0.4.6 test/twin/process_inline_test.rb
disposable-0.4.5 test/twin/process_inline_test.rb
disposable-0.4.4 test/twin/process_inline_test.rb
disposable-0.4.3 test/twin/process_inline_test.rb
disposable-0.4.2 test/twin/process_inline_test.rb
disposable-0.4.1 test/twin/process_inline_test.rb
disposable-0.4.0 test/twin/process_inline_test.rb
disposable-0.3.2 test/twin/process_inline_test.rb
disposable-0.3.1 test/twin/process_inline_test.rb
disposable-0.3.0 test/twin/process_inline_test.rb
disposable-0.2.6 test/twin/process_inline_test.rb
disposable-0.2.5 test/twin/process_inline_test.rb
disposable-0.2.4 test/twin/process_inline_test.rb
disposable-0.2.3 test/twin/process_inline_test.rb