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

require 'generator/exercise_case'

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

  private

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

  def expects_error?
    expected.is_a? Hash
  end
end

Change error expectation to match json data.
Change error expectation to match json data.

The 'Hamming' canonical data has changed to return a hash when the
expected value is an error, rather than the integer value -1 that was
used previously.
