banister / method_source

return the sourcecode for a method
MIT License
361 stars 43 forks source link

Replace Bacon to RSpec 3 #45

Closed junaruga closed 7 years ago

junaruga commented 7 years ago

This fixes https://github.com/banister/method_source/issues/43 Because Bacon stopped the development.

Bacon is kind of light weight testing framework. So, changing to RSpec was easier than minitest.

I changed testing directory from test to spec because spec is default directory for RSpec. I modified method_source.gemspec, as I changed test file name.

But I want to suggest that you will auto-generate gemspec file from Rakefile by rake gemspec by yourself. I did not do it this time by myself. Because the gemsepc file has many differences between before and after.

Or you can consider static gemspec file such as Ref. https://github.com/rack-test/rack-test/blob/master/rack-test.gemspec https://github.com/rack-test/rack-test/pull/181 Maybe good reference. Yesterday's my work :) https://github.com/rspec/rspec-core/blob/master/rspec-core.gemspec https://github.com/rails/rails/blob/master/activesupport/activesupport.gemspec

$ ruby -v
ruby 2.4.1p111 (2017-03-22 revision 58053) [x86_64-linux]

$ bundle exec rake -T
rake clean                 # Remove any temporary products.
rake clobber               # Remove any generated file.
rake default               # Set up and run tests
rake gems                  # build all platform gems at once
rake gemspec               # Build the gemspec file
rake pushgems              # build and push latest gems
rake reinstall             # reinstall gem
rake rmgems                # remove all platform gems
rake ruby:clobber_package  # Remove package products
rake ruby:gem              # Build the gem file method_source-0.8.2.gem
rake ruby:gemspec          # Generate gemspec file
rake ruby:package          # Build all the packages
rake ruby:repackage        # Force a rebuild of the package files
rake spec                  # Run RSpec code examples

$ bundle exec rake
/usr/local/ruby-2.4.1/bin/ruby -w -I/home/jaruga/git/method_source/vendor/bundle/ruby/2.4.0/gems/rspec-core-3.6.0/lib:/home/jaruga/git/method_source/vendor/bundle/ruby/2.4.0/gems/rspec-support-3.6.0/lib /home/jaruga/git/method_source/vendor/bundle/ruby/2.4.0/gems/rspec-core-3.6.0/exe/rspec --pattern spec/\*\*\{,/\*/\*\*\}/\*_spec.rb
/home/jaruga/git/method_source/spec/spec_helper.rb:85: warning: literal in condition
/home/jaruga/git/method_source/spec/spec_helper.rb:92: warning: literal in condition
.................................

Finished in 0.01286 seconds (files took 0.0775 seconds to load)
33 examples, 0 failures
junaruga commented 7 years ago

https://travis-ci.org/banister/method_source/builds/237997347 Error

Libraries missing for ruby-1.9.2: libruby.so.1.9. Refer to your system manual for installing libraries Mounting remote ruby failed with status 10, stopping installation. Gemset '' does not exist, 'rvm ruby-1.9.2 do rvm gemset create ' first, or append '--create'.

I guess that we already have Ruby 1.9.3. Ruby 1.9.2 is too much. I will remove it.

The environment is not prepared on default Ubuntu OS. If we will change it to newer Ubuntu OS: Trusty, maybe it will be available. Recently I knew it.

junaruga commented 7 years ago

https://travis-ci.org/banister/method_source/builds/238003087 Rbx environment does not exist on Trust OS too.

Try again with rbx-3. I know that test-unit's rbx-3 works on that setting. https://github.com/test-unit/test-unit/

junaruga commented 7 years ago

@banister Done. All the test was passed.

junaruga commented 7 years ago

@banister ping :)