Sha256: a0b6882a0d7119ce92555cf9440decd568629bf0b7bceede216c73d8e5a3372f

Contents?: true

Size: 1.48 KB

Versions: 4

Compression:

Stored size: 1.48 KB

Contents

require './test/test_helper'
require 'exercism/submission'

class SubmissionTest < Minitest::Test
  def test_knows_ruby_code
    refute Exercism::Submission.test?('queens.rb')
  end

  def test_identifies_ruby_tests
    assert Exercism::Submission.test?('queens_test.rb')
  end

  def test_knows_elixir_code
    refute Exercism::Submission.test?('queens.exs')
  end

  def test_identifies_elixir_tests
    assert Exercism::Submission.test?('queens_test.exs')
  end

  def test_knows_javascript_code
    refute Exercism::Submission.test?('queens.js')
  end

  def test_identifies_javascript_tests
    assert Exercism::Submission.test?('queens.spec.js')
  end

  def test_knows_clojure_code
    refute Exercism::Submission.test?('queens.clj')
  end

  def test_identifies_clojure_tests
    assert Exercism::Submission.test?('queens_test.clj')
  end

  def test_knows_python_code
    refute Exercism::Submission.test?('queens.py')
  end

  def test_identifies_python_tests
    assert Exercism::Submission.test?('queens_test.py')
  end

  def test_knows_go_code
    refute Exercism::Submission.test?('queens.go')
  end

  def test_identifies_go_tests
    assert Exercism::Submission.test?('queens_test.go')
  end

  def test_full_path
    submission = Exercism::Submission.new('./test/fixtures/ruby/bob/bob.rb')
    refute submission.path.start_with?('.')
    assert submission.path.end_with?('/test/fixtures/ruby/bob/bob.rb')
    diff = submission.path.length - submission.file.length
    assert diff > 1
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
exercism-0.0.28 test/exercism/submission_test.rb
exercism-0.0.27 test/exercism/submission_test.rb
exercism-0.0.26 test/exercism/submission_test.rb
exercism-0.0.25 test/exercism/submission_test.rb