Sha256: aadd236e122d3c22fd1a2eff80906a19397a46aa0728e437cba724e598ca38dc

Contents?: true

Size: 728 Bytes

Versions: 23

Compression:

Stored size: 728 Bytes

Contents

require "test_helper"

class InheritanceTest < Minitest::Spec
  Song = Struct.new(:id, :title, :length) do
    def self.find_by(options); options[:id].nil? ? nil : new(options[:id]) end
  end

  # class Create < Trailblazer::Operation
  #   self["a"] = "A"
  #   self["b"] = "B"
  #   self["c"] = "D"

  #   def self.class(*skills)
  #     Class.new(Trailblazer::Operation). tap do |klass|
  #       skills.each { |skill| klass.heritage.record(:[]=, skill, self[skill]) }
  #     end
  #   end
  # end

  # class Update < Create.class("a", "b")
  # end

  it do
    skip "https://trello.com/c/t8bUJlqb/25-op-class-dependencies"
    Update["a"].must_equal "A"
    Update["b"].must_equal "B"
    Update["c"].must_be_nil
  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
trailblazer-operation-0.11.0 test/inheritance_test.rb
trailblazer-operation-0.10.1 test/inheritance_test.rb
trailblazer-operation-0.10.0 test/inheritance_test.rb
trailblazer-operation-0.9.0 test/inheritance_test.rb
trailblazer-operation-0.8.0 test/inheritance_test.rb
trailblazer-operation-0.8.0.beta1 test/inheritance_test.rb
trailblazer-operation-0.7.5 test/inheritance_test.rb
trailblazer-operation-0.7.4 test/inheritance_test.rb
trailblazer-operation-0.7.3 test/inheritance_test.rb
trailblazer-operation-0.7.2 test/inheritance_test.rb
trailblazer-operation-0.7.1 test/inheritance_test.rb
trailblazer-operation-0.7.0 test/inheritance_test.rb
trailblazer-operation-0.6.6 test/inheritance_test.rb
trailblazer-operation-0.6.5 test/inheritance_test.rb
trailblazer-operation-0.6.4 test/inheritance_test.rb
trailblazer-operation-0.6.3 test/inheritance_test.rb
trailblazer-operation-0.6.2 test/inheritance_test.rb
trailblazer-operation-0.6.1 test/inheritance_test.rb
trailblazer-operation-0.6.0 test/inheritance_test.rb
trailblazer-operation-0.5.3 test/inheritance_test.rb