seattlerb / ruby_parser

ruby_parser is a ruby parser written in pure ruby. It outputs s-expressions which can be manipulated and converted back to ruby via the ruby2ruby gem.
http://www.zenspider.com/projects/ruby_parser.html
476 stars 100 forks source link

Please document how to run tests #337

Open pravi opened 1 year ago

pravi commented 1 year ago

In most projects, bundle install, bundle exec rake runs tests. Here I can see a .autotest and after installing autotest gem and manually installing each dependency gems, autotest fails

$ autotest 
Unhandled exception: No such file or directory - ../../sexp_processor/dev/lib/pt_testcase.rb
/home/pravi/.rvm/rubies/ruby-3.1.2/lib/ruby/3.1.0/find.rb:43:in `block in find'
  /home/pravi/.rvm/rubies/ruby-3.1.2/lib/ruby/3.1.0/find.rb:43:in `collect!'
  /home/pravi/.rvm/rubies/ruby-3.1.2/lib/ruby/3.1.0/find.rb:43:in `find'
  /home/pravi/.rvm/gems/ruby-3.1.2/gems/minitest-autotest-1.1.1/lib/autotest.rb:407:in `block in find_files'
  /home/pravi/.rvm/gems/ruby-3.1.2/gems/minitest-autotest-1.1.1/lib/autotest.rb:405:in `each'
  /home/pravi/.rvm/gems/ruby-3.1.2/gems/minitest-autotest-1.1.1/lib/autotest.rb:405:in `find_files'
  /home/pravi/.rvm/gems/ruby-3.1.2/gems/minitest-autotest-1.1.1/lib/autotest.rb:434:in `find_files_to_test'
  /home/pravi/.rvm/gems/ruby-3.1.2/gems/minitest-autotest-1.1.1/lib/autotest.rb:301:in `run_tests'
  /home/pravi/.rvm/gems/ruby-3.1.2/gems/minitest-autotest-1.1.1/lib/autotest.rb:292:in `get_to_green'
  /home/pravi/.rvm/gems/ruby-3.1.2/gems/minitest-autotest-1.1.1/lib/autotest.rb:263:in `block in run'
  /home/pravi/.rvm/gems/ruby-3.1.2/gems/minitest-autotest-1.1.1/lib/autotest.rb:261:in `loop'
  /home/pravi/.rvm/gems/ruby-3.1.2/gems/minitest-autotest-1.1.1/lib/autotest.rb:261:in `run'
  /home/pravi/.rvm/gems/ruby-3.1.2/gems/minitest-autotest-1.1.1/lib/autotest.rb:152:in `run'
  /home/pravi/.rvm/gems/ruby-3.1.2/gems/minitest-autotest-1.1.1/bin/autotest:5:in `<top (required)>'
  /home/pravi/.rvm/gems/ruby-3.1.2/bin/autotest:25:in `load'
  /home/pravi/.rvm/gems/ruby-3.1.2/bin/autotest:25:in `<main>'
  /home/pravi/.rvm/gems/ruby-3.1.2/bin/ruby_executable_hooks:22:in `eval'
  /home/pravi/.rvm/gems/ruby-3.1.2/bin/ruby_executable_hooks:22:in `<main>'
Quitting
presidentbeef commented 1 year ago

Not Ryan, but I recommend:

gem install hoe minitest isolate
rake newb

After that, just run rake.

pravi commented 1 year ago

@presidentbeef thanks, it'd be nice to add this to README.