running_programs_from_a_file.step

goals do
  goal "Write a ruby program into a file"
  goal "Execute a ruby program stored in a file"
end

step do
  message "In your text editor, create a file called my_program.rb"
  type_in_file 'my_program.rb', <<-CONTENTS
puts 'This code is in a file!'
some_variable = 19
puts "I stored a variable with the value #{19}!"
  CONTENTS
end

step do
  console 'ruby my_program.rb'
  message "You should have seen the output of your program: 'This code is in a file...' etc. If you didn't, you might not be in the directory where you created the file. See if it shows up in `ls`."
end

explanation do
  message "Actual ruby programs aren't written in irb, they're written in files. As your program becomes larger and larger, it may span many files!"
end

next_step "conditionals"