Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

acronym: Update and exclude new tests #950

Merged
merged 1 commit into from
Mar 26, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions exercises/acronym/.meta/generator/acronym_case.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,19 @@ class AcronymCase < Generator::ExerciseCase
def workload
assert_equal(expected, "Acronym.abbreviate('#{phrase}')")
end

def to_s(*args)
super unless excluded_tests.include?(test_name)
end

private

# We exclude these tests because they currently don't fit the purpose
# we have for Acronym on the Ruby track.
def excluded_tests
%w(
test_apostrophes
test_underscore_emphasis
)
end
end
2 changes: 1 addition & 1 deletion exercises/acronym/acronym_test.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
require 'minitest/autorun'
require_relative 'acronym'

# Common test data version: 1.5.0 787d24e
# Common test data version: 1.7.0 cacf1f1
class AcronymTest < Minitest::Test
def test_basic
# skip
Expand Down
2 changes: 1 addition & 1 deletion lib/generator/test_template.erb
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ class <%= exercise_test_classname %> < Minitest::Test
<%=
test_cases.map.with_index do |test_case, index|
test_case.to_s(index.zero?)
end.join("\n")
end.compact.join("\n")
kotp marked this conversation as resolved.
Show resolved Hide resolved
%>end