Skip to content
Open

Done #17

Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 4 additions & 13 deletions spec/say_hello_spec.rb
Original file line number Diff line number Diff line change
@@ -1,14 +1,5 @@
require_relative './spec_helper'
def say_hello(name)
puts "Hello #{name}!"
end

describe "say_hello" do

it 'accepts an argument of a name and prints out Hello with that Name' do
expect($stdout).to receive(:puts).with("Hello Kent Beck!")
say_hello("Kent Beck")
end

it 'defaults to Ruby Programmer when no name is passed in' do
expect($stdout).to receive(:puts).with("Hello Ruby Programmer!")
say_hello()
end
end
say_hello("Gabriella")