Sha256: e9235dc2d77d7fb8606a36916b03734d9acd6d04f73221bb72cecda10655d8de

Contents?: true

Size: 619 Bytes

Versions: 2

Compression:

Stored size: 619 Bytes

Contents

require "test_helper"

class HeritageTest < Minitest::Spec
  # #record
  module RepresenterA
    extend Declarative::DSL

    # one arg.
    heritage.record(:representation_wrap=, true)
    # 2 args.
    heritage.record(:property, :name, enable: true)
    # 3 args.
    heritage.record(:property, :id, {}, &Proc.new{}.extend(Declarative::Inspect))
  end

  it { RepresenterA.heritage.inspect.must_equal "[{:method=>:representation_wrap=, :args=>[true], :block=>nil}, {:method=>:property, :args=>[:name, {:enable=>true}], :block=>nil}, {:method=>:property, :args=>[:id, {}], :block=>#<Proc:@heritage_test.rb:13>}]" }
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
declarative-0.0.3 test/heritage_test.rb
declarative-0.0.2 test/heritage_test.rb