We actually count css selectors, not rules in compass stats

This commit is contained in:
Chris Eppstein 2011-11-04 16:16:22 -07:00
parent b4d6550135
commit 9888efdbc2
2 changed files with 22 additions and 22 deletions

View File

@ -277,7 +277,7 @@ Feature: Command Line
Given I am using the existing project in test/fixtures/stylesheets/compass
When I run: compass stats
Then I am told statistics for each file:
| Filename | Rules | Properties | Mixins Defs | Mixins Used | CSS Rules | CSS Properties |
| Filename | Rules | Properties | Mixins Defs | Mixins Used | CSS Selectors | CSS Properties |
| sass/border_radius.scss | \d+ | \d+ | \d+ | \d+ | \d+ | \d+ |
| sass/box.sass | \d+ | \d+ | \d+ | \d+ | \d+ | \d+ |
| sass/fonts.sass | \d+ | \d+ | \d+ | \d+ | \d+ | \d+ |
@ -290,7 +290,7 @@ Feature: Command Line
| sass/print.sass | \d+ | \d+ | \d+ | \d+ | \d+ | \d+ |
| sass/reset.sass | \d+ | \d+ | \d+ | \d+ | \d+ | \d+ |
| sass/utilities.scss | \d+ | \d+ | \d+ | \d+ | \d+ | \d+ |
| ------------------------- | ----- | ---------- | -------------- | ----------- | --------- | -------------- |
| ------------------------- | ----- | ---------- | -------------- | ----------- | ------------- | -------------- |
| Total.* | \d+ | \d+ | \d+ | \d+ | \d+ | \d+ |
@listframeworks

View File

@ -35,9 +35,9 @@ module Compass
sass_files = sorted_sass_files(compiler)
total_label = "Total (#{sass_files.size} files):"
rows = [[ :-, :-, :-, :-, :-, :-, :- ],
[ 'Filename', 'Rules', 'Properties', 'Mixins Defs', 'Mixins Used', 'CSS Rules', 'CSS Properties' ],
[ 'Filename', 'Rules', 'Properties', 'Mixins Defs', 'Mixins Used', 'CSS Selectors', 'CSS Properties' ],
[ :-, :-, :-, :-, :-, :-, :- ]]
maximums = [ total_label.length, 5, 10, 14, 11, 9, 14 ]
maximums = [ total_label.length, 5, 10, 14, 11, 13, 14 ]
alignments = [ :left, :right, :right, :right, :right, :right, :right ]
delimiters = [ ['| ', ' |'], [' ', ' |'], [' ', ' |'], [' ', ' |'], [' ', ' |'], [' ', ' |'], [' ', ' |'] ]
totals = [ total_label, 0, 0, 0, 0, 0, 0 ]