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.2.0.6 tracks/ruby/exercises/hamming/.meta/generator/hamming_case.rb
trackler-2.2.0.5 tracks/ruby/exercises/hamming/.meta/generator/hamming_case.rb
trackler-2.2.0.4 tracks/ruby/exercises/hamming/.meta/generator/hamming_case.rb
trackler-2.2.0.3 tracks/ruby/exercises/hamming/.meta/generator/hamming_case.rb
trackler-2.2.0.2 tracks/ruby/exercises/hamming/.meta/generator/hamming_case.rb
trackler-2.2.0.1 tracks/ruby/exercises/hamming/.meta/generator/hamming_case.rb
trackler-2.2.0.0 tracks/ruby/exercises/hamming/.meta/generator/hamming_case.rb
trackler-2.1.0.55 tracks/ruby/exercises/hamming/.meta/generator/hamming_case.rb
trackler-2.1.0.54 tracks/ruby/exercises/hamming/.meta/generator/hamming_case.rb
trackler-2.1.0.53 tracks/ruby/exercises/hamming/.meta/generator/hamming_case.rb
trackler-2.1.0.52 tracks/ruby/exercises/hamming/.meta/generator/hamming_case.rb
trackler-2.1.0.51 tracks/ruby/exercises/hamming/.meta/generator/hamming_case.rb
trackler-2.1.0.50 tracks/ruby/exercises/hamming/.meta/generator/hamming_case.rb
trackler-2.1.0.49 tracks/ruby/exercises/hamming/.meta/generator/hamming_case.rb
trackler-2.1.0.48 tracks/ruby/exercises/hamming/.meta/generator/hamming_case.rb
trackler-2.1.0.47 tracks/ruby/exercises/hamming/.meta/generator/hamming_case.rb
trackler-2.1.0.46 tracks/ruby/exercises/hamming/.meta/generator/hamming_case.rb
trackler-2.1.0.45 tracks/ruby/exercises/hamming/.meta/generator/hamming_case.rb
trackler-2.1.0.44 tracks/ruby/exercises/hamming/.meta/generator/hamming_case.rb
trackler-2.1.0.43 tracks/ruby/exercises/hamming/.meta/generator/hamming_case.rb