Skip to content

Instantly share code, notes, and snippets.

@kamilio
Last active June 23, 2016 13:27
Show Gist options
  • Save kamilio/5582548 to your computer and use it in GitHub Desktop.
Save kamilio/5582548 to your computer and use it in GitHub Desktop.
RSpec::Core::RakeTask.module_eval do
def pattern
dir = EngineName.root # replace with you the name of your engine
extras = []
if File.directory?( dir )
extras << File.join( dir, 'spec', '**', '*_spec.rb' ).to_s
end
[@pattern] | extras
end
end
@lsaffie
Copy link

lsaffie commented Oct 23, 2013

Line 3 has to be replaced with EngineName::Engine.root

(append ::Engine to your engine name)

@soniankit
Copy link

Thanks for posting this. This helped.

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