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.1.19 tracks/ruby/exercises/hamming/.meta/generator/hamming_case.rb
trackler-2.2.1.18 tracks/ruby/exercises/hamming/.meta/generator/hamming_case.rb
trackler-2.2.1.17 tracks/ruby/exercises/hamming/.meta/generator/hamming_case.rb
trackler-2.2.1.16 tracks/ruby/exercises/hamming/.meta/generator/hamming_case.rb
trackler-2.2.1.15 tracks/ruby/exercises/hamming/.meta/generator/hamming_case.rb
trackler-2.2.1.14 tracks/ruby/exercises/hamming/.meta/generator/hamming_case.rb
trackler-2.2.1.13 tracks/ruby/exercises/hamming/.meta/generator/hamming_case.rb
trackler-2.2.1.12 tracks/ruby/exercises/hamming/.meta/generator/hamming_case.rb
trackler-2.2.1.11 tracks/ruby/exercises/hamming/.meta/generator/hamming_case.rb
trackler-2.2.1.10 tracks/ruby/exercises/hamming/.meta/generator/hamming_case.rb
trackler-2.2.1.9 tracks/ruby/exercises/hamming/.meta/generator/hamming_case.rb
trackler-2.2.1.8 tracks/ruby/exercises/hamming/.meta/generator/hamming_case.rb
trackler-2.2.1.7 tracks/ruby/exercises/hamming/.meta/generator/hamming_case.rb
trackler-2.2.1.6 tracks/ruby/exercises/hamming/.meta/generator/hamming_case.rb
trackler-2.2.1.5 tracks/ruby/exercises/hamming/.meta/generator/hamming_case.rb
trackler-2.2.1.4 tracks/ruby/exercises/hamming/.meta/generator/hamming_case.rb
trackler-2.2.1.3 tracks/ruby/exercises/hamming/.meta/generator/hamming_case.rb
trackler-2.2.1.2 tracks/ruby/exercises/hamming/.meta/generator/hamming_case.rb
trackler-2.2.1.1 tracks/ruby/exercises/hamming/.meta/generator/hamming_case.rb
trackler-2.2.1.0 tracks/ruby/exercises/hamming/.meta/generator/hamming_case.rb