Skip to content

Commit

Permalink
Fixed squared with size rule implementation and add unit test for it
Browse files Browse the repository at this point in the history
  • Loading branch information
ishubin committed Mar 9, 2016
1 parent 072345b commit 600fb9a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion galen-extras/galen-extras-rules.gspec
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
# | menu.item-* should be squared with ~ 100px size
#
@rule %{objectPattern} should be squared with %{size} size
${objectPattern}
${objectPattern}:
width ${size}
height ${size}

Expand Down
4 changes: 4 additions & 0 deletions rules-tests/rule.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ testSpec("squared.gspec", [], function (spec) {
})
.hasObjectWithSpecGroups("icon-3", {
"almost squared": ["width 90 to 110% of icon-3/height"]
})
.hasRuleSection("icon-* should be squared with 23 to 30 px size", {
"icon-1": ["width 23 to 30 px", "height 23 to 30 px"],
"icon-2": ["width 23 to 30 px", "height 23 to 30 px"]
});
});

Expand Down
2 changes: 2 additions & 0 deletions rules-tests/specs/squared.gspec
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,5 @@

icon-3:
|almost squared

|icon-* should be squared with 23 to 30 px size

0 comments on commit 600fb9a

Please sign in to comment.