toptal / crystalball

Regression Test Selection library for your RSpec test suite
https://toptal.github.io/crystalball/
MIT License
321 stars 41 forks source link

is there a way to exclude generating the maps for certain specs? #98

Closed noralin closed 6 years ago

noralin commented 6 years ago

I'm wondering if it's possible to exclude map generation for spec/features/?

pluff commented 6 years ago

HI @noralin. Excluding is not supported for now, however you can add it relatively easy for you project by extending Crystalball::MapGenerator and using it in your spec helper. Something like

class MyMapGenerator < Crystalball::MapGenerator
    def refresh_for_case(example, *args)
      return if example.id =~ /\A(\.\/)?spec\/features/
      super
    end
end

should work.

noralin commented 6 years ago

Great, thank you! Would you like me to close this?

pluff commented 6 years ago

I'll close it for now, however, If this feature will get some upvotes we might add support of it out of the box in future.