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

Already on GitHub? Sign in to your account

mspec path lacks spec/ruby #1909

Closed
tonysidaway opened this Issue Sep 16, 2012 · 2 comments

Comments

Projects
None yet
2 participants
Contributor

tonysidaway commented Sep 16, 2012

In mspec/lib/mspec/utils/script.rb , the path for MSpecScript.load is set in MSpecScript.config[:path] with the value ['.', 'spec']. This enables MSpecScript.load_default to load the test spec configuration from spec/default.mspec and (for rbx -X18) spec/rbx.1.8.mspec .

However when mspec is run with ruby 2.0, ruby 1.9, or ruby 1.8 (not rubinius) as a target, the equivalent spec files are in spec/ruby/ruby.X.mspec (for X in 1.8, 1.9, 2.0).

As I'm new to this I could be misreading the code or this could be a platform issue, so I raise it as an issue for discussion. Could you verify that you are unable to run the following command?

bin/mspec ci -t r

Error message should be something like:

/home/tony/Installs/rbx/rubinius/mspec/lib/mspec/utils/script.rb:194:in files': undefined methodinject' for nil:NilClass (NoMethodError)
from /home/tony/Installs/rbx/rubinius/mspec/lib/mspec/commands/mspec-ci.rb:63:in options' from /home/tony/Installs/rbx/rubinius/mspec/lib/mspec/utils/script.rb:215:inmain'
from /home/tony/Installs/rbx/rubinius/mspec/bin/mspec-ci:8

If the issue is as I have described it, it can be fixed by adding 'spec/ruby' to the path at line 12 of mspec/lib/mspec/utils/script.rb .

Owner

brixen commented Oct 3, 2012

That's not the right place to add it because mspec/*/ is just bundled source from the mspec repo. MSpec allows hooking in custom code though, so I can add it there.

Owner

brixen commented Oct 3, 2012

Actually, this is more difficult than that. If you want to run with MRI, use -B and the path to the config file.

@brixen brixen closed this Oct 3, 2012

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