Skip to content

Commit 0630d34

Browse files
committed
Use correct terminology
1 parent affde6e commit 0630d34

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
## (unreleased)
22

33
* Upgrades parslet dependency to v1.6.1 and drops optimization monkeypatch
4+
* Use correct terminology "declartions" instead of "rules" in the output
45

56
## 1.3.2 - 6/22/2013 ##
67

lib/csscss/reporter.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ def report(options = {})
1313
selector_groups = selector_groups.map {|selectors| "{#{maybe_color(selectors, :red, should_color)}}" }
1414
last_selector = selector_groups.pop
1515
count = declarations.size
16-
io.puts %Q(#{selector_groups.join(", ")} AND #{last_selector} share #{maybe_color(count, :red, should_color)} rule#{"s" if count > 1})
16+
io.puts %Q(#{selector_groups.join(", ")} AND #{last_selector} share #{maybe_color(count, :red, should_color)} declaration#{"s" if count > 1})
1717
if verbose
1818
declarations.each {|dec| io.puts(" - #{maybe_color(dec, :yellow, should_color)}") }
1919
end

test/csscss/reporter_test.rb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,19 @@ module Csscss
1212
})
1313

1414
expected =<<-EXPECTED
15-
{.foo} AND {.bar} share 2 rules
16-
{h1, h2}, {.foo} AND {.baz} share 1 rule
17-
{h1, h2} AND {.bar} share 1 rule
15+
{.foo} AND {.bar} share 2 declarations
16+
{h1, h2}, {.foo} AND {.baz} share 1 declaration
17+
{h1, h2} AND {.bar} share 1 declaration
1818
EXPECTED
1919
reporter.report(color:false).must_equal expected
2020

2121
expected =<<-EXPECTED
22-
{.foo} AND {.bar} share 2 rules
22+
{.foo} AND {.bar} share 2 declarations
2323
- width: 1px
2424
- border: black
25-
{h1, h2}, {.foo} AND {.baz} share 1 rule
25+
{h1, h2}, {.foo} AND {.baz} share 1 declaration
2626
- display: none
27-
{h1, h2} AND {.bar} share 1 rule
27+
{h1, h2} AND {.bar} share 1 declaration
2828
- position: relative
2929
EXPECTED
3030
reporter.report(verbose:true, color:false).must_equal expected

0 commit comments

Comments
 (0)