[rspec-users] Ignoring certain files?
jko170 at gmail.com
Sun Oct 16 23:48:06 EDT 2011
On Oct 16, 2011, at 3:47 AM, Marten Veldthuis wrote:
> Hey guys,
> Is there any way I can get rspec to ignore all files in spec/fixtures when it does a recursive search for all spec/**/*_spec.rb files?
> The problem I'm facing is that the fixtures for my code are project structures on disk, so I thought I'd make a spec/fixtures with a bunch of different project structures. That works, except obviously those can contain _spec.rb files, which rspec picks up when I try to run it for my gem. So my library Soundcheck has this in it's spec directory:
> When I run "rspec spec" it'll try to execute with_bundler_spec.rb too, but those files shouldn't be run.
> I'd rather keep everything spec-related within "spec/", so I'm hoping this is possible. I know I can run "rspec spec/soundcheck_spec.rb" but obviously as I add more stuff that's not going to be so feasible...
> rspec-users mailing list
> rspec-users at rubyforge.org
RSpec.configure do |config|
config.pattern = FileList[config.pattern].exclude('fixtures')
More information about the rspec-users