Skip to content
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

Running the tests fails when rubigen isn't already installed on the system #2

Closed
graaff opened this issue May 22, 2010 · 5 comments
Closed
Labels

Comments

@graaff
Copy link
Contributor

graaff commented May 22, 2010

First installing rubigen and then running the tests works fine, but that means that the tests always use the already installed generators, not the new ones.

Loaded suite -e
Started
..................F..F.
Finished in 0.16353 seconds.

  1. Failure:
    test: run executable with multiple scopes 'rubygems' and 'something_else' should display installed generators for 'rubygems,something_else'. (TestRubigenCli)
    [./test/test_rubigen_cli.rb:54:in __bind_1274531107_209749' /usr/lib64/ruby/gems/1.8/gems/shoulda-2.10.3/lib/shoulda/context.rb:362:incall'
    /usr/lib64/ruby/gems/1.8/gems/shoulda-2.10.3/lib/shoulda/context.rb:362:in test: run executable with multiple scopes 'rubygems' and 'something_else' should display installed generators for 'rubygems,something_else'. ' /usr/lib64/ruby/gems/1.8/gems/mocha-0.9.8/lib/mocha/integration/test_unit/ruby_version_186_and_above.rb:19:insend'
    /usr/lib64/ruby/gems/1.8/gems/mocha-0.9.8/lib/mocha/integration/test_unit/ruby_version_186_and_above.rb:19:in `run']:
    <"Usage: -e generator [options] [args]\nGeneral Options:\n -h, --help Show this help message and quit.\n -p, --pretend Run but do not make any changes.\n -f, --force Overwrite files that already exist.\n -s, --skip Skip files that already exist.\n -q, --quiet Suppress normal output.\n -t, --backtrace Debugging: show backtrace on errors.\n -c, --svn Modify files with subversion. (Note: svn must be in path)\n -g, --git Modify files with git. (Note: git must be in path)\n\n\nInstalled Generators\n Rubygems: cucumber, feature, rspec_controller, rspec_model\n\nMore are available at http://rubigen.rubyforge.org/\nRun generate with no arguments for usage information\n -e test_unit\n\n"> expected to be =~
    </application_generator/>.

  2. Failure:
    test: run executable with scope 'rubygems' should display installed generators for 'rubygems'. (TestRubigenCli)
    [./test/test_rubigen_cli.rb:35:in __bind_1274531107_237932' /usr/lib64/ruby/gems/1.8/gems/shoulda-2.10.3/lib/shoulda/context.rb:362:incall'
    /usr/lib64/ruby/gems/1.8/gems/shoulda-2.10.3/lib/shoulda/context.rb:362:in test: run executable with scope 'rubygems' should display installed generators for 'rubygems'. ' /usr/lib64/ruby/gems/1.8/gems/mocha-0.9.8/lib/mocha/integration/test_unit/ruby_version_186_and_above.rb:19:insend'
    /usr/lib64/ruby/gems/1.8/gems/mocha-0.9.8/lib/mocha/integration/test_unit/ruby_version_186_and_above.rb:19:in `run']:
    <"Usage: -e generator [options] [args]\nGeneral Options:\n -h, --help Show this help message and quit.\n -p, --pretend Run but do not make any changes.\n -f, --force Overwrite files that already exist.\n -s, --skip Skip files that already exist.\n -q, --quiet Suppress normal output.\n -t, --backtrace Debugging: show backtrace on errors.\n -c, --svn Modify files with subversion. (Note: svn must be in path)\n -g, --git Modify files with git. (Note: git must be in path)\n\n\nInstalled Generators\n Rubygems: cucumber, feature, rspec_controller, rspec_model\n\nMore are available at http://rubigen.rubyforge.org/\nRun generate with no arguments for usage information\n -e test_unit\n\n"> expected to be =~
    </application_generator/>.

23 tests, 103 assertions, 2 failures, 0 errors

@bklang
Copy link
Collaborator

bklang commented Dec 31, 2011

This is fixed. However you need to install some basic gems to be able to generate the gemspec. Long term, we should get rid of Hoe so we can keep the gemspec in the repository and use Bundler. For a quick start on running the tests see https://github.com/drnic/rubigen/blob/master/.travis.yml

@bklang bklang closed this as completed Dec 31, 2011
@graaff
Copy link
Contributor Author

graaff commented Jan 1, 2012

I still see this issue with rubigen 1.5.7. Note that I'm using the gem, so I don't need to generate a gemspec file.

@bklang
Copy link
Collaborator

bklang commented Jan 3, 2012

Are you running the specs with "bundle exec"? I can't reproduce this issue.

@graaff
Copy link
Contributor Author

graaff commented Jan 3, 2012

Obviously not since the Gemfile isn't included in the gem. With bundle exec these features pass. So it's probably best to include the Gemfile also in the gem.

@bklang
Copy link
Collaborator

bklang commented Jan 3, 2012

Good suggestion, thanks. I've added the Gemfile to the Manifest.txt so that it will be included in future rubigen releases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants