Skip to content

Commit

Permalink
Add test for optional trailing period in Styleguide reference.
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnAlbin committed Jan 4, 2015
1 parent 9be9516 commit a8ec218
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
8 changes: 8 additions & 0 deletions test/fixtures/css/buttons.css
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,14 @@ a.button.star {
a.button.star.disabled {
opacity: 0.5; }

/*
Test that trailing period is stripped from the reference.
Styleguide 2.2.2.
*/
a.button.trailing:after {
content: '.'; }

/*
A big button
Expand Down
7 changes: 6 additions & 1 deletion test/parser_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@ def setup
@css_parsed.section('2.1.1').description
end

test "parses KSS keys that have a trailing period" do
assert_equal 'Test that trailing period is stripped from the reference.',
@css_parsed.section('2.2.2').description
end

test "parses KSS keys that are words in CSS" do
assert_equal 'A big button',
@css_parsed.section('Buttons.Big').description
Expand All @@ -76,7 +81,7 @@ def setup
end

test "public sections returns hash of sections" do
assert_equal 5, @css_parsed.sections.count
assert_equal 6, @css_parsed.sections.count
end

test "parse multiple paths" do
Expand Down

0 comments on commit a8ec218

Please sign in to comment.