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.32 tracks/ruby/exercises/dominoes/.meta/generator/dominoes_case.rb
trackler-2.1.0.31 tracks/ruby/exercises/dominoes/.meta/generator/dominoes_case.rb
trackler-2.1.0.30 tracks/ruby/exercises/dominoes/.meta/generator/dominoes_case.rb
trackler-2.1.0.29 tracks/ruby/exercises/dominoes/.meta/generator/dominoes_case.rb
trackler-2.1.0.28 tracks/ruby/exercises/dominoes/.meta/generator/dominoes_case.rb
trackler-2.1.0.27 tracks/ruby/exercises/dominoes/.meta/generator/dominoes_case.rb
trackler-2.1.0.26 tracks/ruby/exercises/dominoes/.meta/generator/dominoes_case.rb
trackler-2.1.0.25 tracks/ruby/exercises/dominoes/.meta/generator/dominoes_case.rb
trackler-2.1.0.24 tracks/ruby/exercises/dominoes/.meta/generator/dominoes_case.rb
trackler-2.1.0.23 tracks/ruby/exercises/dominoes/.meta/generator/dominoes_case.rb
trackler-2.1.0.22 tracks/ruby/exercises/dominoes/.meta/generator/dominoes_case.rb
trackler-2.1.0.21 tracks/ruby/exercises/dominoes/.meta/generator/dominoes_case.rb
trackler-2.1.0.20 tracks/ruby/exercises/dominoes/.meta/generator/dominoes_case.rb
trackler-2.1.0.19 tracks/ruby/exercises/dominoes/.meta/generator/dominoes_case.rb
trackler-2.1.0.18 tracks/ruby/exercises/dominoes/.meta/generator/dominoes_case.rb
trackler-2.1.0.17 tracks/ruby/exercises/dominoes/.meta/generator/dominoes_case.rb
trackler-2.1.0.16 tracks/ruby/exercises/dominoes/.meta/generator/dominoes_case.rb
trackler-2.1.0.15 tracks/ruby/exercises/dominoes/.meta/generator/dominoes_case.rb
trackler-2.1.0.14 tracks/ruby/exercises/dominoes/.meta/generator/dominoes_case.rb
trackler-2.1.0.13 tracks/ruby/exercises/dominoes/.meta/generator/dominoes_case.rb