Skip to content

Commit

Permalink
hello world tests via updated x-common data
Browse files Browse the repository at this point in the history
  • Loading branch information
kotp committed Mar 17, 2017
1 parent 40e35ed commit 72f5d93
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 17 deletions.
2 changes: 1 addition & 1 deletion exercises/hello-world/.meta/.version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1
2
16 changes: 2 additions & 14 deletions exercises/hello-world/hello_world_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,11 @@
exit 1
end

# Test data version:
# deb225e Implement canonical dataset for scrabble-score problem (#255)

# Common test data version: 4b9ae53
class HelloWorldTest < Minitest::Test
def test_no_name
def test_hello
assert_equal 'Hello, World!', HelloWorld.hello
end

def test_sample_name
skip
assert_equal 'Hello, Alice!', HelloWorld.hello('Alice')
end

def test_other_sample_name
skip
assert_equal 'Hello, Bob!', HelloWorld.hello('Bob')
end
end

__END__
Expand Down
4 changes: 2 additions & 2 deletions lib/hello_world_cases.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

class HelloWorldCase < OpenStruct
def test_name
'test_%s' % description.gsub(/[ -]/, '_')
'test_%s' % property.gsub(/[ -]/, '_')
end

def do
defined?(name) ? "HelloWorld.hello('#{name}')" : 'HelloWorld.hello'
'HelloWorld.hello'
end

def skipped?
Expand Down

0 comments on commit 72f5d93

Please sign in to comment.