New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix mocha deprecation warnings with riot and change insert_into_gemfile to allow :require => false #1384

Merged
merged 1 commit into from Aug 27, 2013

Conversation

Projects
None yet
2 participants
@dashdotat
Contributor

dashdotat commented Aug 25, 2013

This commit allows :require => false to be used with insert_into_gemfile (before it would enter it as :require => 'false' and also fixes deprecation warning from mocha when used with riot

@dariocravero

This comment has been minimized.

Show comment
Hide comment
@dariocravero

dariocravero Aug 27, 2013

Contributor

Thanks for the patch @kgfullerton. I don't really use mocha/riot so I might be missing something here. However, I tried the current code in Padrino - just created an empty project and added a route with its test - and I don't see any deprecation warnings when running rake test. Am I missing something? Thanks :) Darío

Contributor

dariocravero commented Aug 27, 2013

Thanks for the patch @kgfullerton. I don't really use mocha/riot so I might be missing something here. However, I tried the current code in Padrino - just created an empty project and added a route with its test - and I don't see any deprecation warnings when running rake test. Am I missing something? Thanks :) Darío

@dashdotat

This comment has been minimized.

Show comment
Hide comment
@dashdotat

dashdotat Aug 27, 2013

Contributor

I've put a minimal repository which replicates this at https://github.com/kgfullerton/padrino-test - running padrino rake test from the project directory gives the following output for me:

=> Executing Rake test ...
/home/kfullert/.rubies/ruby-2.0.0-p247/bin/ruby -I"lib" -I"/home/kfullert/code/padrino-test/.rv/2.0.0/gem_home/gems/rake-10.1.0/lib" "/home/kfullert/code/padrino-test/.rv/2.0.0/gem_home/gems/rake-10.1.0/lib/rake/rake_test_loader.rb" "test/models/**/*_test.rb"

*** Mocha deprecation warning: Change `require 'mocha'` to `require 'mocha/setup'`.


*** Mocha deprecation warning: Test::Unit or MiniTest must be loaded *before* Mocha.


*** Mocha deprecation warning: If you're integrating with a test library other than Test::Unit or MiniTest, you should use `require 'mocha/api'` instead of `require 'mocha'`.

User Model can be created
  + asserts that record is not nil

1 passes, 0 failures, 0 errors in 0.003061 seconds

The project was generated by padrino-gen project padrino-test -b -d mongomapper -t riot -m mocha and once installed and in the project directory running padrino gen model User followed by padrino rake test to replicate

Contributor

dashdotat commented Aug 27, 2013

I've put a minimal repository which replicates this at https://github.com/kgfullerton/padrino-test - running padrino rake test from the project directory gives the following output for me:

=> Executing Rake test ...
/home/kfullert/.rubies/ruby-2.0.0-p247/bin/ruby -I"lib" -I"/home/kfullert/code/padrino-test/.rv/2.0.0/gem_home/gems/rake-10.1.0/lib" "/home/kfullert/code/padrino-test/.rv/2.0.0/gem_home/gems/rake-10.1.0/lib/rake/rake_test_loader.rb" "test/models/**/*_test.rb"

*** Mocha deprecation warning: Change `require 'mocha'` to `require 'mocha/setup'`.


*** Mocha deprecation warning: Test::Unit or MiniTest must be loaded *before* Mocha.


*** Mocha deprecation warning: If you're integrating with a test library other than Test::Unit or MiniTest, you should use `require 'mocha/api'` instead of `require 'mocha'`.

User Model can be created
  + asserts that record is not nil

1 passes, 0 failures, 0 errors in 0.003061 seconds

The project was generated by padrino-gen project padrino-test -b -d mongomapper -t riot -m mocha and once installed and in the project directory running padrino gen model User followed by padrino rake test to replicate

dariocravero added a commit that referenced this pull request Aug 27, 2013

Merge pull request #1384 from kgfullerton/mocha_fixes
Fix mocha deprecation warnings with riot and change insert_into_gemfile to allow :require => false

@dariocravero dariocravero merged commit 9a9e363 into padrino:master Aug 27, 2013

1 check failed

default The Travis CI build failed
Details
@dariocravero

This comment has been minimized.

Show comment
Hide comment
@dariocravero

dariocravero Aug 27, 2013

Contributor

Brilliant @kgfullerton! Thanks a mill! :)

Contributor

dariocravero commented Aug 27, 2013

Brilliant @kgfullerton! Thanks a mill! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment