Sha256: d958aa3eff29673e99d5f838301836a86e34227f4d34c7e6bd921e6358cc9984

Contents?: true

Size: 361 Bytes

Versions: 159

Compression:

Stored size: 361 Bytes

Contents

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

Version data entries

159 entries across 159 versions & 1 rubygems

Version Path
trackler-2.2.1.38 tracks/ruby/exercises/hamming/.meta/generator/hamming_case.rb
trackler-2.2.1.37 tracks/ruby/exercises/hamming/.meta/generator/hamming_case.rb
trackler-2.2.1.36 tracks/ruby/exercises/hamming/.meta/generator/hamming_case.rb
trackler-2.2.1.35 tracks/ruby/exercises/hamming/.meta/generator/hamming_case.rb
trackler-2.2.1.34 tracks/ruby/exercises/hamming/.meta/generator/hamming_case.rb
trackler-2.2.1.33 tracks/ruby/exercises/hamming/.meta/generator/hamming_case.rb
trackler-2.2.1.32 tracks/ruby/exercises/hamming/.meta/generator/hamming_case.rb
trackler-2.2.1.31 tracks/ruby/exercises/hamming/.meta/generator/hamming_case.rb
trackler-2.2.1.30 tracks/ruby/exercises/hamming/.meta/generator/hamming_case.rb
trackler-2.2.1.29 tracks/ruby/exercises/hamming/.meta/generator/hamming_case.rb
trackler-2.2.1.28 tracks/ruby/exercises/hamming/.meta/generator/hamming_case.rb
trackler-2.2.1.27 tracks/ruby/exercises/hamming/.meta/generator/hamming_case.rb
trackler-2.2.1.26 tracks/ruby/exercises/hamming/.meta/generator/hamming_case.rb
trackler-2.2.1.25 tracks/ruby/exercises/hamming/.meta/generator/hamming_case.rb
trackler-2.2.1.24 tracks/ruby/exercises/hamming/.meta/generator/hamming_case.rb
trackler-2.2.1.23 tracks/ruby/exercises/hamming/.meta/generator/hamming_case.rb
trackler-2.2.1.22 tracks/ruby/exercises/hamming/.meta/generator/hamming_case.rb
trackler-2.2.1.21 tracks/ruby/exercises/hamming/.meta/generator/hamming_case.rb
trackler-2.2.1.20 tracks/ruby/exercises/hamming/.meta/generator/hamming_case.rb