Sha256: 5045e6d448e4c43e48d226514cf713cf9eb765511653a234fa2d84c384b6abb1

Contents?: true

Size: 336 Bytes

Versions: 233

Compression:

Stored size: 336 Bytes

Contents

require 'generator/exercise_case'

class NthPrimeCase < Generator::ExerciseCase

  def workload
    if raises_error?
      assert_raises(ArgumentError) { test_case }
    else
      assert_equal { test_case }
    end
  end

  private

  def test_case
    "Prime.nth(#{input})"
  end

  def raises_error?
    expected == false
  end

end

Version data entries

233 entries across 233 versions & 1 rubygems

Version Path
trackler-2.2.1.98 tracks/ruby/exercises/nth-prime/.meta/generator/nth_prime_case.rb
trackler-2.2.1.97 tracks/ruby/exercises/nth-prime/.meta/generator/nth_prime_case.rb
trackler-2.2.1.96 tracks/ruby/exercises/nth-prime/.meta/generator/nth_prime_case.rb
trackler-2.2.1.95 tracks/ruby/exercises/nth-prime/.meta/generator/nth_prime_case.rb
trackler-2.2.1.94 tracks/ruby/exercises/nth-prime/.meta/generator/nth_prime_case.rb
trackler-2.2.1.93 tracks/ruby/exercises/nth-prime/.meta/generator/nth_prime_case.rb
trackler-2.2.1.92 tracks/ruby/exercises/nth-prime/.meta/generator/nth_prime_case.rb
trackler-2.2.1.91 tracks/ruby/exercises/nth-prime/.meta/generator/nth_prime_case.rb
trackler-2.2.1.90 tracks/ruby/exercises/nth-prime/.meta/generator/nth_prime_case.rb
trackler-2.2.1.89 tracks/ruby/exercises/nth-prime/.meta/generator/nth_prime_case.rb
trackler-2.2.1.88 tracks/ruby/exercises/nth-prime/.meta/generator/nth_prime_case.rb
trackler-2.2.1.87 tracks/ruby/exercises/nth-prime/.meta/generator/nth_prime_case.rb
trackler-2.2.1.86 tracks/ruby/exercises/nth-prime/.meta/generator/nth_prime_case.rb
trackler-2.2.1.85 tracks/ruby/exercises/nth-prime/.meta/generator/nth_prime_case.rb
trackler-2.2.1.84 tracks/ruby/exercises/nth-prime/.meta/generator/nth_prime_case.rb
trackler-2.2.1.83 tracks/ruby/exercises/nth-prime/.meta/generator/nth_prime_case.rb
trackler-2.2.1.82 tracks/ruby/exercises/nth-prime/.meta/generator/nth_prime_case.rb
trackler-2.2.1.81 tracks/ruby/exercises/nth-prime/.meta/generator/nth_prime_case.rb
trackler-2.2.1.80 tracks/ruby/exercises/nth-prime/.meta/generator/nth_prime_case.rb
trackler-2.2.1.79 tracks/ruby/exercises/nth-prime/.meta/generator/nth_prime_case.rb