Minitest Error - ArgumentError: wrong number of arguments (given 1, expected 0)
<p>I am doing an exercise on exercism.io. This is requested in the Spec document:</p>

<ol>
<li>The <code>Hello World!</code> program will greet me, the caller.</li>
<li>If I tell the program my name is Alice, it will greet me by saying "Hello, Alice!".</li>
<li>If I neglect to give it my name, it will greet me by saying "Hello, World!"</li>
</ol>

<hr>

<pre><code>class HelloWorldTest &lt; Minitest::Test
  def test_no_name
    assert_equal 'Hello, World!', HelloWorld.hello
  end

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

  def test_other_sample_name
    assert_equal 'Hello, Bob!', HelloWorld.hello('Bob')
  end
end
</code></pre>

<p>This is my program:</p>

<pre><code>class HelloWorld
  def self.hello
    "Hello, World!"
  end

  def initialize(name)
    @name = name
  end

  def say_hello
    puts "Hello, #{@name}!"
  end
end

print "Give me your name: "
your_name = gets.chomp
hello = HelloWorld.new(your_name)
if your_name == ""
  puts "Hello, World!"
else
  hello.say_hello
end
</code></pre>

<p>The program runs and satisfies all of the requirements, but I get the error:</p>

<pre><code>1) Error:
HelloWorldTest#test_sample_name:
ArgumentError: wrong number of arguments (given 1, expected 0)
    /Users/drempel/exercism/ruby/hello-world/hello_world.rb:3:in `hello'
    hello_world_test.rb:24:in `test_sample_name'

3 runs, 1 assertions, 0 failures, 1 errors, 1 skips
</code></pre>

<p>How do I define a method that doesn't require arguments?</p>