[rspec-users] Custom File List for Rails 3 Spec Task

Scott Taylor scott at railsnewbie.com
Sat Nov 6 18:04:50 EDT 2010

I have some javascript specs (using the jspec javascript framework) in my rails 3 project, living in the spec/javascript directory.  How can I exclude the ruby files in the jspec project from being run when I run "rake spec"?

RSpec::Core::RakeTask used to take a file list (which was usually generated with a glob pattern and an explicit call to Dir.glob).  Now it only takes a glob pattern:


So how am I supposed to express the following in one glob pattern?

Dir.glob("spec/**/*_spec.rb") - Dir.glob("spec/javascript/**/*_spec.rb")

Or is there a better way that I'm missing entirely,



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20101106/9b2099ac/attachment-0001.html>

More information about the rspec-users mailing list