Skip to content

Commit 2b3b57f

Browse files
committed
Greets user by name
added code to greet user by name after asked for their name.
1 parent 26da409 commit 2b3b57f

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

bin/greetings.rb

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
puts "What is your name?"
2+
name = gets.chomp!
3+
4+
puts "Hello #{name}!"

spec/greetings_spec.rb

-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
describe "Greetings" do
44
it 'asks the user for their name and outputs the customized greeting' do
5-
pending
65
# this is the same as typing `ruby bin/greetings.rb` at the command line
76
run_script("greetings.rb")
87
type("Mike")

0 commit comments

Comments
 (0)