Last active
December 18, 2021 14:26
-
-
Save jwg2s/7361603 to your computer and use it in GitHub Desktop.
No Focus Trues in Source
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
it 'should ensure we have no extra focus true exist' do | |
files = Dir.glob(File.join(Rails.root, 'spec', '**', '*_spec.rb')) | |
count = 0 | |
files.each do |file| | |
unless File.readlines(file).grep(/focus['"]?\s*[\:=][>]?\s*true/).empty? | |
puts "#{file} has focus true!" | |
count = count + 1 | |
end | |
end | |
count.should == 0 | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment