watch(%r{^lib/(.+)\.rb$}) do |m| "spec/#{m[1]}_spec.rb" end ! # watch /spec/ files watch(%r{^spec/(.+)\.rb$}) do |m| "spec/#{m[1]}.rb" end end Guardfile $ bundle exec guard 09:53:55 - INFO - Guard is using Tmux to send notifications. 09:53:55 - INFO - Guard is using TerminalTitle to send notifications. 09:53:55 - INFO - Guard::RSpec is running 09:53:55 - INFO - Guard is now watching at '/path/to/Sinderella'
puts "hello world!" end end ! a = A.new ! # set x to 10 x = 10 ! # start a REPL session binding.pry ! # program resumes here (after pry session) puts "program resumes here. Value of x is: #{x}." test.rb
puts x 10 => nil pry(main)> def a.goodbye pry(main)* puts "goodbye cruel world!" pry(main)* end => nil pry(main)> a.goodbye goodbye cruel world! => nil pry(main)> x = "changed" pry(main)> exit ! # OUTPUT: program resumes here Value of x is: changed.