Skip to content

Instantly share code, notes, and snippets.

@jwg2s
Last active December 18, 2021 14:26
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jwg2s/7361603 to your computer and use it in GitHub Desktop.
Save jwg2s/7361603 to your computer and use it in GitHub Desktop.
No Focus Trues in Source
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