-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathexample.tt
More file actions
45 lines (36 loc) · 1.21 KB
/
example.tt
File metadata and controls
45 lines (36 loc) · 1.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/usr/bin/env ruby
begin
gem 'minitest', '>= 5.0.0'
require 'minitest/autorun'
require_relative 'hello_world'
rescue Gem::LoadError => e
puts "\nMissing Dependency:\n#{e.backtrace.first} #{e.message}"
puts 'Minitest 5.0 gem must be installed for the xRuby track.'
rescue LoadError => e
puts "\nError:\n#{e.backtrace.first} #{e.message}"
puts DATA.read
exit 1
end
# Test data version:
# <%= sha1 %>
class HelloWorldTest < Minitest::Test<% test_cases.each do |test_case| %>
def <%= test_case.test_name %><% if test_case.skipped? %>
skip<% end %>
assert_equal '<%= test_case.expected %>', <%= test_case.do %>
end
<% end %>end
__END__
*****************************************************
You got an error, which is exactly as it should be.
This is the first step in the Test-Driven Development
(TDD) process.
The most important part of the error is
cannot load such file
It's looking for a file named hello_world.rb that doesn't
exist yet.
To fix the error, create an empty file named hello_world.rb
in the same directory as the hello_world_test.rb file.
Then run the test again.
For more guidance as you work on this exercise, see
GETTING_STARTED.md.
*****************************************************