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.159 tracks/ruby/exercises/nth-prime/.meta/generator/nth_prime_case.rb
trackler-2.2.1.158 tracks/ruby/exercises/nth-prime/.meta/generator/nth_prime_case.rb
trackler-2.2.1.157 tracks/ruby/exercises/nth-prime/.meta/generator/nth_prime_case.rb
trackler-2.2.1.156 tracks/ruby/exercises/nth-prime/.meta/generator/nth_prime_case.rb
trackler-2.2.1.155 tracks/ruby/exercises/nth-prime/.meta/generator/nth_prime_case.rb
trackler-2.2.1.154 tracks/ruby/exercises/nth-prime/.meta/generator/nth_prime_case.rb
trackler-2.2.1.153 tracks/ruby/exercises/nth-prime/.meta/generator/nth_prime_case.rb
trackler-2.2.1.152 tracks/ruby/exercises/nth-prime/.meta/generator/nth_prime_case.rb
trackler-2.2.1.151 tracks/ruby/exercises/nth-prime/.meta/generator/nth_prime_case.rb
trackler-2.2.1.150 tracks/ruby/exercises/nth-prime/.meta/generator/nth_prime_case.rb
trackler-2.2.1.149 tracks/ruby/exercises/nth-prime/.meta/generator/nth_prime_case.rb
trackler-2.2.1.148 tracks/ruby/exercises/nth-prime/.meta/generator/nth_prime_case.rb
trackler-2.2.1.147 tracks/ruby/exercises/nth-prime/.meta/generator/nth_prime_case.rb
trackler-2.2.1.146 tracks/ruby/exercises/nth-prime/.meta/generator/nth_prime_case.rb
trackler-2.2.1.145 tracks/ruby/exercises/nth-prime/.meta/generator/nth_prime_case.rb
trackler-2.2.1.144 tracks/ruby/exercises/nth-prime/.meta/generator/nth_prime_case.rb
trackler-2.2.1.143 tracks/ruby/exercises/nth-prime/.meta/generator/nth_prime_case.rb
trackler-2.2.1.142 tracks/ruby/exercises/nth-prime/.meta/generator/nth_prime_case.rb
trackler-2.2.1.141 tracks/ruby/exercises/nth-prime/.meta/generator/nth_prime_case.rb
trackler-2.2.1.140 tracks/ruby/exercises/nth-prime/.meta/generator/nth_prime_case.rb