Sha256: da431aa33387bcea13a7bf3053927bce71af2019f6aa7385fa98b8c525987030

Contents?: true

Size: 1.35 KB

Versions: 151

Compression:

Stored size: 1.35 KB

Contents

#!/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:
# deb225e Implement canonical dataset for scrabble-score problem (#255)

class HelloWorldTest < Minitest::Test
  def test_no_name
    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__

*****************************************************
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.
*****************************************************

Version data entries

151 entries across 151 versions & 1 rubygems

Version Path
trackler-2.0.8.51 tracks/ruby/exercises/hello-world/hello_world_test.rb
trackler-2.0.8.50 tracks/ruby/exercises/hello-world/hello_world_test.rb
trackler-2.0.8.49 tracks/ruby/exercises/hello-world/hello_world_test.rb
trackler-2.0.8.48 tracks/ruby/exercises/hello-world/hello_world_test.rb
trackler-2.0.8.47 tracks/ruby/exercises/hello-world/hello_world_test.rb
trackler-2.0.8.46 tracks/ruby/exercises/hello-world/hello_world_test.rb
trackler-2.0.8.45 tracks/ruby/exercises/hello-world/hello_world_test.rb
trackler-2.0.8.44 tracks/ruby/exercises/hello-world/hello_world_test.rb
trackler-2.0.8.43 tracks/ruby/exercises/hello-world/hello_world_test.rb
trackler-2.0.8.42 tracks/ruby/exercises/hello-world/hello_world_test.rb
trackler-2.0.8.41 tracks/ruby/exercises/hello-world/hello_world_test.rb
trackler-2.0.8.40 tracks/ruby/exercises/hello-world/hello_world_test.rb
trackler-2.0.8.39 tracks/ruby/exercises/hello-world/hello_world_test.rb
trackler-2.0.8.38 tracks/ruby/exercises/hello-world/hello_world_test.rb
trackler-2.0.8.37 tracks/ruby/exercises/hello-world/hello_world_test.rb
trackler-2.0.8.36 tracks/ruby/exercises/hello-world/hello_world_test.rb
trackler-2.0.8.35 tracks/ruby/exercises/hello-world/hello_world_test.rb
trackler-2.0.8.34 tracks/ruby/exercises/hello-world/hello_world_test.rb
trackler-2.0.8.33 tracks/ruby/exercises/hello-world/hello_world_test.rb
trackler-2.0.8.32 tracks/ruby/exercises/hello-world/hello_world_test.rb