aboutsummaryrefslogtreecommitdiffstats
path: root/spec/quality_spec.rb
diff options
context:
space:
mode:
authorAditya Prakash <aditya.prakash132@gmail.com>2016-03-08 11:50:15 +0530
committerAditya Prakash <aditya.prakash132@gmail.com>2016-03-09 07:51:32 +0530
commit4eefb1ee2b8e2c2ba005ec27003bbf83b174f374 (patch)
tree638a46a55a2e6cf1221b1512647b56c6d6347207 /spec/quality_spec.rb
parentfeb41629b7cf0267e624857393f7cf198c764755 (diff)
downloadbundler-4eefb1ee2b8e2c2ba005ec27003bbf83b174f374.tar.gz
Add test for checking langauge of sentences used in source code
Diffstat (limited to 'spec/quality_spec.rb')
-rw-r--r--spec/quality_spec.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/spec/quality_spec.rb b/spec/quality_spec.rb
index 8fccdbba..ce03839c 100644
--- a/spec/quality_spec.rb
+++ b/spec/quality_spec.rb
@@ -110,6 +110,19 @@ describe "The library itself" do
expect(error_messages.compact).to be_well_formed
end
+ it "maintains language quality of sentences used in source code" do
+ error_messages = []
+ exempt = /vendor/
+ Dir.chdir(File.expand_path("../../lib", __FILE__)) do
+ `git ls-files -z`.split("\x0").each do |filename|
+ next if filename =~ exempt
+ error_messages << check_for_expendable_words(filename)
+ error_messages << check_for_specific_pronouns(filename)
+ end
+ end
+ expect(error_messages.compact).to be_well_formed
+ end
+
it "can still be built" do
Dir.chdir(root) do
`gem build bundler.gemspec`