-
Notifications
You must be signed in to change notification settings - Fork 199
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #90 from Igosuki/feat/add-box-sizing-tests
Add tests for box-sizing mixin
- Loading branch information
Showing
1 changed file
with
37 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
var render = require('../helper/render'); | ||
var ruleset = require('../helper/ruleset'); | ||
|
||
describe("CSS3 Boz Sizing", function () { | ||
|
||
describe("CSS3 an argument", function () { | ||
|
||
it("should generate a box-size property", function (done) { | ||
render(ruleset('$experimental-support-for-mozilla: false !global; $experimental-support-for-opera: false !global; @include box-sizing(border-box)'), function(output, err) { | ||
expect(output).toBe(ruleset('-webkit-box-sizing:border-box;box-sizing:border-box')); | ||
done(); | ||
}, ['compass/css3/box-sizing']); | ||
}); | ||
|
||
}); | ||
|
||
describe("CSS3 an empty argument", function () { | ||
describe("in a ruleset without other properties", function () { | ||
it("should generate nothing", function (done) { | ||
render(ruleset('$experimental-support-for-mozilla: false !global; $experimental-support-for-opera: false !global; @include box-sizing("")'), function(output, err) { | ||
expect(output).toBe(''); | ||
done(); | ||
}, ['compass/css3/box-sizing']); | ||
}); | ||
}); | ||
|
||
describe("in a ruleset with other properties", function () { | ||
it("should generate the other properties", function (done) { | ||
render(ruleset('$experimental-support-for-mozilla: false !global; $experimental-support-for-opera: false !global; foo: bar; @include box-sizing("")'), function(output, err) { | ||
expect(output).toBe(ruleset('foo:bar')); | ||
done(); | ||
}, ['compass/css3/box-sizing']); | ||
}); | ||
}); | ||
}); | ||
|
||
}); |