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

phone-number: Regenerate Tests #870

Merged
merged 2 commits into from
Oct 16, 2018
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
12 changes: 11 additions & 1 deletion exercises/phone-number/.meta/generator/phone_number_case.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@

class PhoneNumberCase < Generator::ExerciseCase
def workload
assert_equal(expected, "PhoneNumber.clean(#{phrase.inspect})")
if error_expected?
assert_equal(nil, subject_of_test)
else
assert_equal(expected, subject_of_test)
end
end

private

def subject_of_test
"PhoneNumber.clean(#{phrase.inspect})"
end
end
2 changes: 1 addition & 1 deletion exercises/phone-number/phone_number_test.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
require 'minitest/autorun'
require_relative 'phone_number'

# Common test data version: 1.5.0 e8a5119
# Common test data version: 1.6.0 a317aa4
class PhoneNumberTest < Minitest::Test
def test_cleans_the_number
# skip
Expand Down