jrhorn424

Untitled

Nov 11th, 2013
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.70 KB | None | 0 0
  1. ### Rakefile
  2. require 'pry'
  3.  
  4. project_dir = File.dirname(__FILE__)
  5.  
  6. $LOAD_PATH << project_dir # let's see ./test
  7. $LOAD_PATH << File.join(project_dir, 'lib')
  8.  
  9. Dir[File.join(project_dir, 'lib', '*.rb')].each { |f| require f }
  10.  
  11. desc "Run minitest suite"
  12. task :test do
  13.   Dir.glob('test/specs/*_spec.rb') { |f| require f }
  14. end
  15.  
  16. desc "Open a console with libraries loaded"
  17. task :console do
  18.   binding.pry
  19. end
  20.  
  21. ### output
  22. ➜  001 git:(master) ✗ rake console
  23. rake aborted!
  24. cannot load such file -- pry
  25. /Users/jrhorn424/learning/arlrug/codenight/001/Rakefile:1:in `require'
  26. /Users/jrhorn424/learning/arlrug/codenight/001/Rakefile:1:in `<top (required)>'
  27. (See full trace by running task with --trace)
Advertisement
Add Comment
Please, Sign In to add comment