Sha256: ea543ba1af8589921ea6449dc1216395b59012d83b427542697e24e4955c7c52

Contents?: true

Size: 308 Bytes

Versions: 74

Compression:

Stored size: 308 Bytes

Contents

require 'generator/exercise_case'

class HammingCase < Generator::ExerciseCase
  def workload
    if raises_error?
      assert_raises(ArgumentError) { test_case }
    else
      assert_equal { test_case }
    end
  end

  private

  def test_case
    "Hamming.compute('#{strand1}', '#{strand2}')"
  end
end

Version data entries

74 entries across 74 versions & 1 rubygems

Version Path
trackler-2.1.0.21 tracks/ruby/exercises/hamming/.meta/generator/hamming_case.rb
trackler-2.1.0.20 tracks/ruby/exercises/hamming/.meta/generator/hamming_case.rb
trackler-2.1.0.19 tracks/ruby/exercises/hamming/.meta/generator/hamming_case.rb
trackler-2.1.0.18 tracks/ruby/exercises/hamming/.meta/generator/hamming_case.rb
trackler-2.1.0.17 tracks/ruby/exercises/hamming/.meta/generator/hamming_case.rb
trackler-2.1.0.16 tracks/ruby/exercises/hamming/.meta/generator/hamming_case.rb
trackler-2.1.0.15 tracks/ruby/exercises/hamming/.meta/generator/hamming_case.rb
trackler-2.1.0.14 tracks/ruby/exercises/hamming/.meta/generator/hamming_case.rb
trackler-2.1.0.13 tracks/ruby/exercises/hamming/.meta/generator/hamming_case.rb
trackler-2.1.0.12 tracks/ruby/exercises/hamming/.meta/generator/hamming_case.rb
trackler-2.1.0.11 tracks/ruby/exercises/hamming/.meta/generator/hamming_cases.rb
trackler-2.1.0.10 tracks/ruby/exercises/hamming/.meta/generator/hamming_cases.rb
trackler-2.1.0.9 tracks/ruby/exercises/hamming/.meta/generator/hamming_cases.rb
trackler-2.1.0.8 tracks/ruby/exercises/hamming/.meta/generator/hamming_cases.rb