Skip to content

Commit 72f5d93

Browse files
committed
hello world tests via updated x-common data
re: exercism/problem-specifications#520
1 parent 40e35ed commit 72f5d93

File tree

3 files changed

+5
-17
lines changed

3 files changed

+5
-17
lines changed

exercises/hello-world/.meta/.version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1
1+
2

exercises/hello-world/hello_world_test.rb

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -12,23 +12,11 @@
1212
exit 1
1313
end
1414

15-
# Test data version:
16-
# deb225e Implement canonical dataset for scrabble-score problem (#255)
17-
15+
# Common test data version: 4b9ae53
1816
class HelloWorldTest < Minitest::Test
19-
def test_no_name
17+
def test_hello
2018
assert_equal 'Hello, World!', HelloWorld.hello
2119
end
22-
23-
def test_sample_name
24-
skip
25-
assert_equal 'Hello, Alice!', HelloWorld.hello('Alice')
26-
end
27-
28-
def test_other_sample_name
29-
skip
30-
assert_equal 'Hello, Bob!', HelloWorld.hello('Bob')
31-
end
3220
end
3321

3422
__END__

lib/hello_world_cases.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
class HelloWorldCase < OpenStruct
44
def test_name
5-
'test_%s' % description.gsub(/[ -]/, '_')
5+
'test_%s' % property.gsub(/[ -]/, '_')
66
end
77

88
def do
9-
defined?(name) ? "HelloWorld.hello('#{name}')" : 'HelloWorld.hello'
9+
'HelloWorld.hello'
1010
end
1111

1212
def skipped?

0 commit comments

Comments
 (0)