Sha256: 20e6998853cb9ea9edcdb7b48f8239c09261d2ba98c2b6047d85150dc60f551b

Contents?: true

Size: 380 Bytes

Versions: 45

Compression:

Stored size: 380 Bytes

Contents

require 'generator/exercise_case'

class DominoesCase < Generator::ExerciseCase
  def name
    'test_%s' % description.gsub("can't", 'can not').gsub(/[= -]+/, '_')
  end

  def workload
    <<-WL.chomp
input_dominoes = #{input}
    output_chain = Dominoes.chain(input_dominoes)
    #{can_chain ? 'assert' : 'refute' }_correct_chain(input_dominoes, output_chain)
    WL
  end

end

Version data entries

45 entries across 45 versions & 1 rubygems

Version Path
trackler-2.1.0.53 tracks/ruby/exercises/dominoes/.meta/generator/dominoes_case.rb
trackler-2.1.0.52 tracks/ruby/exercises/dominoes/.meta/generator/dominoes_case.rb
trackler-2.1.0.51 tracks/ruby/exercises/dominoes/.meta/generator/dominoes_case.rb
trackler-2.1.0.50 tracks/ruby/exercises/dominoes/.meta/generator/dominoes_case.rb
trackler-2.1.0.49 tracks/ruby/exercises/dominoes/.meta/generator/dominoes_case.rb
trackler-2.1.0.48 tracks/ruby/exercises/dominoes/.meta/generator/dominoes_case.rb
trackler-2.1.0.47 tracks/ruby/exercises/dominoes/.meta/generator/dominoes_case.rb
trackler-2.1.0.46 tracks/ruby/exercises/dominoes/.meta/generator/dominoes_case.rb
trackler-2.1.0.45 tracks/ruby/exercises/dominoes/.meta/generator/dominoes_case.rb
trackler-2.1.0.44 tracks/ruby/exercises/dominoes/.meta/generator/dominoes_case.rb
trackler-2.1.0.43 tracks/ruby/exercises/dominoes/.meta/generator/dominoes_case.rb
trackler-2.1.0.42 tracks/ruby/exercises/dominoes/.meta/generator/dominoes_case.rb
trackler-2.1.0.41 tracks/ruby/exercises/dominoes/.meta/generator/dominoes_case.rb
trackler-2.1.0.40 tracks/ruby/exercises/dominoes/.meta/generator/dominoes_case.rb
trackler-2.1.0.39 tracks/ruby/exercises/dominoes/.meta/generator/dominoes_case.rb
trackler-2.1.0.38 tracks/ruby/exercises/dominoes/.meta/generator/dominoes_case.rb
trackler-2.1.0.37 tracks/ruby/exercises/dominoes/.meta/generator/dominoes_case.rb
trackler-2.1.0.36 tracks/ruby/exercises/dominoes/.meta/generator/dominoes_case.rb
trackler-2.1.0.34 tracks/ruby/exercises/dominoes/.meta/generator/dominoes_case.rb
trackler-2.1.0.33 tracks/ruby/exercises/dominoes/.meta/generator/dominoes_case.rb