oulu-rails 0.5.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/MIT-LICENSE +22 -0
- data/README.md +23 -0
- data/lib/oulu-rails/version.rb +3 -0
- data/lib/oulu-rails.rb +27 -0
- data/vendor/assets/javascripts/oulu/dev/positions-p.js.coffee +34 -0
- data/vendor/assets/javascripts/oulu/dev/positions-pp.js.coffee +57 -0
- data/vendor/assets/javascripts/oulu/dev/positions.js.coffee +6 -0
- data/vendor/assets/javascripts/oulu/helpers/js-autosize.js.coffee +2 -0
- data/vendor/assets/javascripts/oulu/helpers/js-checkbox.js.coffee +6 -0
- data/vendor/assets/javascripts/oulu/helpers/js-click-animate.js.coffee +8 -0
- data/vendor/assets/javascripts/oulu/helpers/js-delay-hidden.js.coffee +4 -0
- data/vendor/assets/javascripts/oulu/helpers/js-focused.js.coffee +7 -0
- data/vendor/assets/javascripts/oulu/helpers/js-hack.js.coffee +8 -0
- data/vendor/assets/javascripts/oulu/helpers/js-hide-after.j.coffee +5 -0
- data/vendor/assets/javascripts/oulu/helpers/js-hover-z-index.js.coffee +5 -0
- data/vendor/assets/javascripts/oulu/helpers/js-hovered.js.coffee +17 -0
- data/vendor/assets/javascripts/oulu/helpers/js-one-animate.js.coffee +5 -0
- data/vendor/assets/javascripts/oulu/helpers/js-open-children.js.coffee +28 -0
- data/vendor/assets/javascripts/oulu/helpers/js-open.js.coffee +51 -0
- data/vendor/assets/javascripts/oulu/helpers/js-scroll-to-top.js.coffee +11 -0
- data/vendor/assets/javascripts/oulu/helpers/js-scroll.js.coffee +9 -0
- data/vendor/assets/javascripts/oulu/helpers/js-side-slide.js.coffee +6 -0
- data/vendor/assets/javascripts/oulu/helpers/js-window-loading.js.coffee +15 -0
- data/vendor/assets/javascripts/oulu/helpers/js-window-sizes.js.coffee +6 -0
- data/vendor/assets/javascripts/oulu/helpers/open-close.js.coffee +23 -0
- data/vendor/assets/javascripts/oulu/ie/PIE_IE678.js +72 -0
- data/vendor/assets/javascripts/oulu/ie/PIE_IE9.js +46 -0
- data/vendor/assets/javascripts/oulu/ie/ie-selectors.js.coffee +3 -0
- data/vendor/assets/javascripts/oulu/ie/ie8-selectors.js.coffee +3 -0
- data/vendor/assets/javascripts/oulu/ie/ie9-selectors.js.coffee +6 -0
- data/vendor/assets/javascripts/oulu/ie/jquery.belatedPNG.min.js +29 -0
- data/vendor/assets/javascripts/oulu/ie/jquery.linkscubber.js +7 -0
- data/vendor/assets/javascripts/oulu/ie/svgeezy.min.js +12 -0
- data/vendor/assets/javascripts/oulu/plugins/check-box.js.coffee +34 -0
- data/vendor/assets/javascripts/oulu/plugins/footerFixed.js +74 -0
- data/vendor/assets/javascripts/oulu/plugins/jquery.autosize.min.js +7 -0
- data/vendor/assets/javascripts/oulu/plugins/jquery.cheat-code.js +63 -0
- data/vendor/assets/javascripts/oulu/plugins/jquery.css3form.js +195 -0
- data/vendor/assets/javascripts/oulu/plugins/jquery.depend.min.js +13 -0
- data/vendor/assets/javascripts/oulu/plugins/sns-buttons.js +339 -0
- data/vendor/assets/javascripts/oulu-ie8.js +6 -0
- data/vendor/assets/javascripts/oulu-ie9.js +2 -0
- data/vendor/assets/javascripts/oulu.js +2 -0
- data/vendor/assets/stylesheets/_oulu-base.css.sass +86 -0
- data/vendor/assets/stylesheets/_oulu.css.sass +13 -0
- data/vendor/assets/stylesheets/bootcamp/CHANGELOG.md +70 -0
- data/vendor/assets/stylesheets/bootcamp/CONTRIBUTING.md +72 -0
- data/vendor/assets/stylesheets/bootcamp/Gruntfile.coffee +34 -0
- data/vendor/assets/stylesheets/bootcamp/LICENSE.md +7 -0
- data/vendor/assets/stylesheets/bootcamp/README.md +52 -0
- data/vendor/assets/stylesheets/bootcamp/bower.json +15 -0
- data/vendor/assets/stylesheets/bootcamp/dist/_bootcamp.scss +46 -0
- data/vendor/assets/stylesheets/bootcamp/dist/bootcamp.coffee +101 -0
- data/vendor/assets/stylesheets/bootcamp/dist/core/functions/_actual.scss +3 -0
- data/vendor/assets/stylesheets/bootcamp/dist/core/functions/_error.scss +29 -0
- data/vendor/assets/stylesheets/bootcamp/dist/core/functions/_expect.scss +6 -0
- data/vendor/assets/stylesheets/bootcamp/dist/core/functions/_not-to.scss +5 -0
- data/vendor/assets/stylesheets/bootcamp/dist/core/functions/_should.scss +6 -0
- data/vendor/assets/stylesheets/bootcamp/dist/core/functions/_to.scss +5 -0
- data/vendor/assets/stylesheets/bootcamp/dist/core/mixins/_describe.scss +31 -0
- data/vendor/assets/stylesheets/bootcamp/dist/core/mixins/_it.scss +31 -0
- data/vendor/assets/stylesheets/bootcamp/dist/core/mixins/_runner.scss +28 -0
- data/vendor/assets/stylesheets/bootcamp/dist/core/mixins/_should.scss +46 -0
- data/vendor/assets/stylesheets/bootcamp/dist/core/mixins/_xdescribe.scss +9 -0
- data/vendor/assets/stylesheets/bootcamp/dist/core/mixins/_xit.scss +9 -0
- data/vendor/assets/stylesheets/bootcamp/dist/core/variables/_helpers.scss +5 -0
- data/vendor/assets/stylesheets/bootcamp/dist/core/variables/_settings.scss +2 -0
- data/vendor/assets/stylesheets/bootcamp/dist/core/variables/_should.scss +6 -0
- data/vendor/assets/stylesheets/bootcamp/dist/core/variables/_trackers.scss +6 -0
- data/vendor/assets/stylesheets/bootcamp/dist/lib/_sassyjson.scss +1075 -0
- data/vendor/assets/stylesheets/bootcamp/dist/matchers/_be.scss +3 -0
- data/vendor/assets/stylesheets/bootcamp/dist/matchers/_equal.scss +3 -0
- data/vendor/assets/stylesheets/bootcamp/dist/matchers/lists/_be-empty.scss +3 -0
- data/vendor/assets/stylesheets/bootcamp/dist/matchers/lists/_be-longer-than.scss +3 -0
- data/vendor/assets/stylesheets/bootcamp/dist/matchers/lists/_be-shorter-than.scss +3 -0
- data/vendor/assets/stylesheets/bootcamp/dist/matchers/lists/_contain.scss +3 -0
- data/vendor/assets/stylesheets/bootcamp/dist/matchers/lists/_deep-contain.scss +3 -0
- data/vendor/assets/stylesheets/bootcamp/dist/matchers/lists/_deep-equal.scss +47 -0
- data/vendor/assets/stylesheets/bootcamp/dist/matchers/lists/_have-length-of.scss +3 -0
- data/vendor/assets/stylesheets/bootcamp/dist/matchers/numbers/_be-close-to.scss +12 -0
- data/vendor/assets/stylesheets/bootcamp/dist/matchers/numbers/_be-greater-than.scss +12 -0
- data/vendor/assets/stylesheets/bootcamp/dist/matchers/numbers/_be-less-than.scss +12 -0
- data/vendor/assets/stylesheets/bootcamp/dist/matchers/types/_be-falsy.scss +3 -0
- data/vendor/assets/stylesheets/bootcamp/dist/matchers/types/_be-null.scss +3 -0
- data/vendor/assets/stylesheets/bootcamp/dist/matchers/types/_be-truthy.scss +3 -0
- data/vendor/assets/stylesheets/bootcamp/dist/matchers/types/_have-type-of.scss +3 -0
- data/vendor/assets/stylesheets/bootcamp/dist/utils/_contain.scss +15 -0
- data/vendor/assets/stylesheets/bootcamp/dist/utils/_equal.scss +23 -0
- data/vendor/assets/stylesheets/bootcamp/dist/utils/_list-join.scss +35 -0
- data/vendor/assets/stylesheets/bootcamp/dist/utils/_power.scss +15 -0
- data/vendor/assets/stylesheets/bootcamp/package.json +63 -0
- data/vendor/assets/stylesheets/bootcamp/tasks/bootcamp.coffee +83 -0
- data/vendor/assets/stylesheets/bootcamp/test/core/functions/_actual.scss +10 -0
- data/vendor/assets/stylesheets/bootcamp/test/core/functions/_expect.scss +6 -0
- data/vendor/assets/stylesheets/bootcamp/test/core/functions/_not-to.scss +5 -0
- data/vendor/assets/stylesheets/bootcamp/test/core/functions/_should.scss +10 -0
- data/vendor/assets/stylesheets/bootcamp/test/core/functions/_to.scss +5 -0
- data/vendor/assets/stylesheets/bootcamp/test/core/mixins/_describe.scss +11 -0
- data/vendor/assets/stylesheets/bootcamp/test/core/mixins/_it.scss +5 -0
- data/vendor/assets/stylesheets/bootcamp/test/core/mixins/_should.scss +5 -0
- data/vendor/assets/stylesheets/bootcamp/test/core/mixins/_xdescribe.scss +28 -0
- data/vendor/assets/stylesheets/bootcamp/test/core/mixins/_xit.scss +12 -0
- data/vendor/assets/stylesheets/bootcamp/test/matchers/_be.scss +90 -0
- data/vendor/assets/stylesheets/bootcamp/test/matchers/_equal.scss +33 -0
- data/vendor/assets/stylesheets/bootcamp/test/matchers/lists/_be-empty.scss +12 -0
- data/vendor/assets/stylesheets/bootcamp/test/matchers/lists/_be-longer-than.scss +29 -0
- data/vendor/assets/stylesheets/bootcamp/test/matchers/lists/_be-shorter-than.scss +29 -0
- data/vendor/assets/stylesheets/bootcamp/test/matchers/lists/_contain.scss +39 -0
- data/vendor/assets/stylesheets/bootcamp/test/matchers/lists/_deep-contain.scss +51 -0
- data/vendor/assets/stylesheets/bootcamp/test/matchers/lists/_deep-equal.scss +151 -0
- data/vendor/assets/stylesheets/bootcamp/test/matchers/lists/_have-length-of.scss +31 -0
- data/vendor/assets/stylesheets/bootcamp/test/matchers/numbers/_be-close-to.scss +24 -0
- data/vendor/assets/stylesheets/bootcamp/test/matchers/numbers/_be-greater-than.scss +16 -0
- data/vendor/assets/stylesheets/bootcamp/test/matchers/numbers/_be-less-than.scss +16 -0
- data/vendor/assets/stylesheets/bootcamp/test/matchers/types/_be-falsy.scss +14 -0
- data/vendor/assets/stylesheets/bootcamp/test/matchers/types/_be-null.scss +13 -0
- data/vendor/assets/stylesheets/bootcamp/test/matchers/types/_be-truthy.scss +13 -0
- data/vendor/assets/stylesheets/bootcamp/test/matchers/types/_have-type-of.scss +17 -0
- data/vendor/assets/stylesheets/bootcamp/test/specs.scss +45 -0
- data/vendor/assets/stylesheets/bootcamp/test/utils/_contain.scss +41 -0
- data/vendor/assets/stylesheets/bootcamp/test/utils/_equal.scss +79 -0
- data/vendor/assets/stylesheets/bootcamp/test/utils/_list-join.scss +39 -0
- data/vendor/assets/stylesheets/bootcamp/test/utils/_power.scss +13 -0
- data/vendor/assets/stylesheets/helper/_base-helper.css.sass +133 -0
- data/vendor/assets/stylesheets/helper/_click-actions.css.sass +188 -0
- data/vendor/assets/stylesheets/helper/_fade-actions.css.sass +30 -0
- data/vendor/assets/stylesheets/helper/_margin-padding.css.sass +16 -0
- data/vendor/assets/stylesheets/helper/_typoglaphy.css.sass +9 -0
- data/vendor/assets/stylesheets/options/amazlet/_amazlet.css.sass +32 -0
- data/vendor/assets/stylesheets/options/glitch/_glitch.css.sass +31 -0
- data/vendor/assets/stylesheets/options/oulu-buttons/_button-basic.css.sass +31 -0
- data/vendor/assets/stylesheets/options/web-fonts/_cousine.css.sass +12 -0
- data/vendor/assets/stylesheets/options/web-fonts/_font-awsome.css.sass +8 -0
- data/vendor/assets/stylesheets/options/web-fonts/_icomoon.css.sass +10 -0
- data/vendor/assets/stylesheets/options/web-fonts/_lato.css.sass +12 -0
- data/vendor/assets/stylesheets/options/web-fonts/_montserrat.css.sass +13 -0
- data/vendor/assets/stylesheets/options/web-fonts/_old-standard.css.sass +12 -0
- data/vendor/assets/stylesheets/options/web-fonts/_open-sans.css.sass +11 -0
- data/vendor/assets/stylesheets/options/web-fonts/_podkova.css.sass +12 -0
- data/vendor/assets/stylesheets/options/web-fonts/_pt-sans.css.sass +12 -0
- data/vendor/assets/stylesheets/options/web-fonts/_roboto.css.sass +11 -0
- data/vendor/assets/stylesheets/options/web-fonts/_satisfy.css.sass +13 -0
- data/vendor/assets/stylesheets/options/web-fonts/_source-code-pro.css.sass +13 -0
- data/vendor/assets/stylesheets/options/web-fonts/_source-sans-pro.css.sass +13 -0
- data/vendor/assets/stylesheets/options/web-fonts/_special-elite.css.sass +12 -0
- data/vendor/assets/stylesheets/options/web-fonts/_tauri.css.sass +11 -0
- data/vendor/assets/stylesheets/options/web-fonts/_ubuntu.css.sass +12 -0
- data/vendor/assets/stylesheets/settings/functions/_background.css.sass +60 -0
- data/vendor/assets/stylesheets/settings/functions/_bool.css.sass +5 -0
- data/vendor/assets/stylesheets/settings/functions/_border.css.sass +47 -0
- data/vendor/assets/stylesheets/settings/functions/_color.css.sass +65 -0
- data/vendor/assets/stylesheets/settings/functions/_content.css.sass +5 -0
- data/vendor/assets/stylesheets/settings/functions/_cursor.css.sass +5 -0
- data/vendor/assets/stylesheets/settings/functions/_direction.css.sass +8 -0
- data/vendor/assets/stylesheets/settings/functions/_image.css.sass +8 -0
- data/vendor/assets/stylesheets/settings/functions/_length.css.sass +20 -0
- data/vendor/assets/stylesheets/settings/functions/_list.css.sass +11 -0
- data/vendor/assets/stylesheets/settings/functions/_map.css.sass +5 -0
- data/vendor/assets/stylesheets/settings/functions/_number.css.sass +63 -0
- data/vendor/assets/stylesheets/settings/functions/_position.css.sass +47 -0
- data/vendor/assets/stylesheets/settings/functions/_reverse.css.sass +22 -0
- data/vendor/assets/stylesheets/settings/functions/_string.css.sass +5 -0
- data/vendor/assets/stylesheets/settings/functions/_text.css.sass +34 -0
- data/vendor/assets/stylesheets/settings/initializers/_reset.css.sass +85 -0
- data/vendor/assets/stylesheets/settings/mixins/_animation.css.sass +15 -0
- data/vendor/assets/stylesheets/settings/mixins/_background.css.sass +33 -0
- data/vendor/assets/stylesheets/settings/mixins/_balloon-tale.css.sass +111 -0
- data/vendor/assets/stylesheets/settings/mixins/_basic-font.css.sass +40 -0
- data/vendor/assets/stylesheets/settings/mixins/_block.css.sass +30 -0
- data/vendor/assets/stylesheets/settings/mixins/_border.css.sass +28 -0
- data/vendor/assets/stylesheets/settings/mixins/_button-base.css.sass +27 -0
- data/vendor/assets/stylesheets/settings/mixins/_clear-type.css.sass +4 -0
- data/vendor/assets/stylesheets/settings/mixins/_color.css.sass +9 -0
- data/vendor/assets/stylesheets/settings/mixins/_filters.css.sass +5 -0
- data/vendor/assets/stylesheets/settings/mixins/_form.css.sass +7 -0
- data/vendor/assets/stylesheets/settings/mixins/_grids.css.sass +149 -0
- data/vendor/assets/stylesheets/settings/mixins/_html5-input-types.scss +118 -0
- data/vendor/assets/stylesheets/settings/mixins/_ie-hacks.css.sass +8 -0
- data/vendor/assets/stylesheets/settings/mixins/_lines.css.sass +18 -0
- data/vendor/assets/stylesheets/settings/mixins/_link.css.sass +11 -0
- data/vendor/assets/stylesheets/settings/mixins/_list.css.sass +21 -0
- data/vendor/assets/stylesheets/settings/mixins/_margin-padding.css.sass +69 -0
- data/vendor/assets/stylesheets/settings/mixins/_overlay.css.sass +5 -0
- data/vendor/assets/stylesheets/settings/mixins/_positions.css.sass +28 -0
- data/vendor/assets/stylesheets/settings/mixins/_rem.css.sass +53 -0
- data/vendor/assets/stylesheets/settings/mixins/_resets.css.sass +17 -0
- data/vendor/assets/stylesheets/settings/mixins/_responsive-utilities.css.sass +160 -0
- data/vendor/assets/stylesheets/settings/mixins/_sassmatic.css.sass +172 -0
- data/vendor/assets/stylesheets/settings/mixins/_sprite-background.css.sass +18 -0
- data/vendor/assets/stylesheets/settings/mixins/_tables.css.sass +14 -0
- data/vendor/assets/stylesheets/settings/mixins/_text.css.sass +21 -0
- data/vendor/assets/stylesheets/settings/variables/_default.css.sass +69 -0
- metadata +362 -0
@@ -0,0 +1,29 @@
|
|
1
|
+
@include describe("Be longer than") {
|
2
|
+
@include it("should expect longer lists to be longer") {
|
3
|
+
@include should( expect( (1, 2, 3) ), to( be-longer-than( 2)));
|
4
|
+
@include should( expect( (1) ), to( be-longer-than( 0)));
|
5
|
+
@include should( expect( () ), to( be-longer-than(-1)));
|
6
|
+
}
|
7
|
+
|
8
|
+
@include it("should expect shorter lists not to be longer") {
|
9
|
+
@include should( expect( (1, 2, 3) ), not-to( be-longer-than(4)));
|
10
|
+
@include should( expect( (1) ), not-to( be-longer-than(2)));
|
11
|
+
@include should( expect( () ), not-to( be-longer-than(1)));
|
12
|
+
}
|
13
|
+
|
14
|
+
@include it("should expect equal length lists not to be longer") {
|
15
|
+
@include should( expect( (1, 2, 3) ), not-to( be-longer-than(3)));
|
16
|
+
@include should( expect( (1) ), not-to( be-longer-than(1)));
|
17
|
+
@include should( expect( () ), not-to( be-longer-than(0)));
|
18
|
+
}
|
19
|
+
|
20
|
+
@include it("should expect other values to be longer than 0") {
|
21
|
+
@include should( expect( null ), to( be-longer-than(0)));
|
22
|
+
@include should( expect( "string" ), to( be-longer-than(0)));
|
23
|
+
}
|
24
|
+
|
25
|
+
@include it("should expect other values to be shorter than 1") {
|
26
|
+
@include should( expect( null ), not-to( be-longer-than(1)));
|
27
|
+
@include should( expect( "string" ), not-to( be-longer-than(1)));
|
28
|
+
}
|
29
|
+
}
|
@@ -0,0 +1,29 @@
|
|
1
|
+
@include describe("Be shorter than") {
|
2
|
+
@include it("should expect shorter lists to be shorter") {
|
3
|
+
@include should( expect( (1, 2, 3) ), to( be-shorter-than(4)));
|
4
|
+
@include should( expect( (1) ), to( be-shorter-than(2)));
|
5
|
+
@include should( expect( () ), to( be-shorter-than(1)));
|
6
|
+
}
|
7
|
+
|
8
|
+
@include it("should expect longer lists not to be shorter") {
|
9
|
+
@include should( expect( (1, 2, 3) ), not-to( be-shorter-than( 2)));
|
10
|
+
@include should( expect( (1) ), not-to( be-shorter-than( 0)));
|
11
|
+
@include should( expect( () ), not-to( be-shorter-than(-1)));
|
12
|
+
}
|
13
|
+
|
14
|
+
@include it("should expect equal length lists not to be shorter") {
|
15
|
+
@include should( expect( (1, 2, 3) ), not-to( be-shorter-than(3)));
|
16
|
+
@include should( expect( (1) ), not-to( be-shorter-than(1)));
|
17
|
+
@include should( expect( () ), not-to( be-shorter-than(0)));
|
18
|
+
}
|
19
|
+
|
20
|
+
@include it("should expect other values to be shorter than 2") {
|
21
|
+
@include should( expect( null ), to( be-shorter-than(2)));
|
22
|
+
@include should( expect( "string" ), to( be-shorter-than(2)));
|
23
|
+
}
|
24
|
+
|
25
|
+
@include it("should expect other values to be shorter than 0") {
|
26
|
+
@include should( expect( null ), not-to( be-shorter-than(0)));
|
27
|
+
@include should( expect( "string" ), not-to( be-shorter-than(0)));
|
28
|
+
}
|
29
|
+
}
|
@@ -0,0 +1,39 @@
|
|
1
|
+
@include describe("Contain") {
|
2
|
+
@include it("should expect list with value to contain") {
|
3
|
+
$list-1: true, true, true;
|
4
|
+
$list-2: "foo", "bar", "baz";
|
5
|
+
$list-3: 100, 0.2, 12;
|
6
|
+
$list-4: false, null, false;
|
7
|
+
|
8
|
+
@include should( expect( $list-1 ), to( contain( true )));
|
9
|
+
@include should( expect( $list-2 ), to( contain( "bar" )));
|
10
|
+
@include should( expect( $list-3 ), to( contain( 100 )));
|
11
|
+
@include should( expect( $list-4 ), to( contain( null )));
|
12
|
+
}
|
13
|
+
|
14
|
+
@include it("should expect list without value not to contain") {
|
15
|
+
$list-1: true, true, true;
|
16
|
+
$list-2: "foo", "bar", "baz";
|
17
|
+
$list-3: 100, 0.2, 12;
|
18
|
+
$list-4: false, null, false;
|
19
|
+
|
20
|
+
@include should( expect( $list-1 ), not-to( contain( false )));
|
21
|
+
@include should( expect( $list-2 ), not-to( contain( "fiz" )));
|
22
|
+
@include should( expect( $list-3 ), not-to( contain( 300 )));
|
23
|
+
@include should( expect( $list-4 ), not-to( contain( "sod" )));
|
24
|
+
}
|
25
|
+
|
26
|
+
@include it("should expect item with value to contain") {
|
27
|
+
@include should( expect( true ), to( contain( true )));
|
28
|
+
@include should( expect( "bar" ), to( contain( "bar" )));
|
29
|
+
@include should( expect( 100 ), to( contain( 100 )));
|
30
|
+
@include should( expect( null ), to( contain( null )));
|
31
|
+
}
|
32
|
+
|
33
|
+
@include it("should expect item without value not to contain") {
|
34
|
+
@include should( expect( true ), not-to( contain( false )));
|
35
|
+
@include should( expect( "foo" ), not-to( contain( "fiz" )));
|
36
|
+
@include should( expect( 200 ), not-to( contain( 300 )));
|
37
|
+
@include should( expect( null ), not-to( contain( "sod" )));
|
38
|
+
}
|
39
|
+
}
|
@@ -0,0 +1,51 @@
|
|
1
|
+
@include describe("Deep Contain") {
|
2
|
+
@include it("should expect deep list with value to contain") {
|
3
|
+
$list-1: false, (true, true);
|
4
|
+
$list-2: "foo", ("bar", "baz");
|
5
|
+
$list-3: 100, (0.2, 12);
|
6
|
+
$list-4: false, (null, false);
|
7
|
+
|
8
|
+
@include should( expect( $list-1 ), to( deep-contain( true )));
|
9
|
+
@include should( expect( $list-2 ), to( deep-contain( "bar" )));
|
10
|
+
@include should( expect( $list-3 ), to( deep-contain( 0.2 )));
|
11
|
+
@include should( expect( $list-4 ), to( deep-contain( null )));
|
12
|
+
}
|
13
|
+
|
14
|
+
@include it("should expect deep list without value not to contain") {
|
15
|
+
$list-1: true, (true, true);
|
16
|
+
$list-2: "foo", ("bar", "baz");
|
17
|
+
$list-3: 100, (0.2, 12);
|
18
|
+
$list-4: false, (null, false);
|
19
|
+
|
20
|
+
@include should( expect( $list-1 ), not-to( deep-contain( false )));
|
21
|
+
@include should( expect( $list-2 ), not-to( deep-contain( "fiz" )));
|
22
|
+
@include should( expect( $list-3 ), not-to( deep-contain( 300 )));
|
23
|
+
@include should( expect( $list-4 ), not-to( deep-contain( "sod" )));
|
24
|
+
}
|
25
|
+
|
26
|
+
@include it("should expect non-deep list with value to contain") {
|
27
|
+
$list-1: false, true, true;
|
28
|
+
$list-2: "foo", "bar", "baz";
|
29
|
+
$list-3: 100, 0.2, 12;
|
30
|
+
$list-4: false, null, false;
|
31
|
+
|
32
|
+
@include should( expect( $list-1 ), to( deep-contain( true )));
|
33
|
+
@include should( expect( $list-2 ), to( deep-contain( "bar" )));
|
34
|
+
@include should( expect( $list-3 ), to( deep-contain( 0.2 )));
|
35
|
+
@include should( expect( $list-4 ), to( deep-contain( null )));
|
36
|
+
}
|
37
|
+
|
38
|
+
@include it("should expect item with value to contain") {
|
39
|
+
@include should( expect( true ), to( deep-contain( true )));
|
40
|
+
@include should( expect( "bar" ), to( deep-contain( "bar" )));
|
41
|
+
@include should( expect( 100 ), to( deep-contain( 100 )));
|
42
|
+
@include should( expect( null ), to( deep-contain( null )));
|
43
|
+
}
|
44
|
+
|
45
|
+
@include it("should expect item without value not to contain") {
|
46
|
+
@include should( expect( true ), not-to( deep-contain( false )));
|
47
|
+
@include should( expect( "foo" ), not-to( deep-contain( "fiz" )));
|
48
|
+
@include should( expect( 200 ), not-to( deep-contain( 300 )));
|
49
|
+
@include should( expect( null ), not-to( deep-contain( "sod" )));
|
50
|
+
}
|
51
|
+
}
|
@@ -0,0 +1,151 @@
|
|
1
|
+
@include describe("Deep Equal") {
|
2
|
+
@include it("should expect an equal deep list to be deep equal") {
|
3
|
+
$list-1: false, (true, true);
|
4
|
+
$list-2: "foo", ("bar", "baz");
|
5
|
+
$list-3: 100, (0.2, 12);
|
6
|
+
$list-4: null, (null, false);
|
7
|
+
|
8
|
+
@include should( expect( $list-1 ), to( deep-equal( $list-1 )));
|
9
|
+
@include should( expect( $list-2 ), to( deep-equal( $list-2 )));
|
10
|
+
@include should( expect( $list-3 ), to( deep-equal( $list-3 )));
|
11
|
+
@include should( expect( $list-4 ), to( deep-equal( $list-4 )));
|
12
|
+
}
|
13
|
+
|
14
|
+
@include it("should expect an longer top level deep list not to be deep equal") {
|
15
|
+
$list-1a: true, (true, (true));
|
16
|
+
$list-1b: true, true, (true, (true));
|
17
|
+
|
18
|
+
$list-2a: "foo", ("bar", ("baz"));
|
19
|
+
$list-2b: "foo", "cha", ("bar", ("baz"));
|
20
|
+
|
21
|
+
$list-3a: 100, (0.2, (12));
|
22
|
+
$list-3b: 100, 200, (0.2, (12));
|
23
|
+
|
24
|
+
$list-4a: null, (null, false);
|
25
|
+
$list-4b: null, false, (null, false);
|
26
|
+
|
27
|
+
@include should( expect( $list-1a ), not-to( deep-equal( $list-1b )));
|
28
|
+
@include should( expect( $list-2a ), not-to( deep-equal( $list-2b )));
|
29
|
+
@include should( expect( $list-3a ), not-to( deep-equal( $list-3b )));
|
30
|
+
@include should( expect( $list-4a ), not-to( deep-equal( $list-4b )));
|
31
|
+
}
|
32
|
+
|
33
|
+
@include it("should expect an longer inner level deep list not to be deep equal") {
|
34
|
+
$list-1a: true, ( true, (true));
|
35
|
+
$list-1b: true, (true, true, (true));
|
36
|
+
|
37
|
+
$list-2a: "foo", ( "bar", ("baz"));
|
38
|
+
$list-2b: "foo", ("cha", "bar", ("baz"));
|
39
|
+
|
40
|
+
$list-3a: 100, ( 0.2, 12);
|
41
|
+
$list-3b: 100, (200, 0.2, 12);
|
42
|
+
|
43
|
+
$list-4a: null, ( null, false);
|
44
|
+
$list-4b: null, (false, null, false);
|
45
|
+
|
46
|
+
@include should( expect( $list-1a ), not-to( deep-equal( $list-1b )));
|
47
|
+
@include should( expect( $list-2a ), not-to( deep-equal( $list-2b )));
|
48
|
+
@include should( expect( $list-3a ), not-to( deep-equal( $list-3b )));
|
49
|
+
@include should( expect( $list-4a ), not-to( deep-equal( $list-4b )));
|
50
|
+
}
|
51
|
+
|
52
|
+
@include it("should expect an deep list with a different top level value not to be deep equal") {
|
53
|
+
$list-1a: true, (true, (true));
|
54
|
+
$list-1b: false, (true, (true));
|
55
|
+
|
56
|
+
$list-2a: "foo", ("bar", ("baz"));
|
57
|
+
$list-2b: "bar", ("bar", ("baz"));
|
58
|
+
|
59
|
+
$list-3a: 100, (0.2, (12));
|
60
|
+
$list-3b: 200, (0.2, (12));
|
61
|
+
|
62
|
+
$list-4a: null, (null, false);
|
63
|
+
$list-4b: false, (null, false);
|
64
|
+
|
65
|
+
@include should( expect( $list-1a ), not-to( deep-equal( $list-1b )));
|
66
|
+
@include should( expect( $list-2a ), not-to( deep-equal( $list-2b )));
|
67
|
+
@include should( expect( $list-3a ), not-to( deep-equal( $list-3b )));
|
68
|
+
@include should( expect( $list-4a ), not-to( deep-equal( $list-4b )));
|
69
|
+
}
|
70
|
+
|
71
|
+
@include it("should expect an deep list with a different inner level value not to be deep equal") {
|
72
|
+
$list-1a: true, (false, (true));
|
73
|
+
$list-1b: true, (true, (true));
|
74
|
+
|
75
|
+
$list-2a: "foo", ("bar", ("baz"));
|
76
|
+
$list-2b: "foo", ("foo", ("baz"));
|
77
|
+
|
78
|
+
$list-3a: 100, (0.2, (12));
|
79
|
+
$list-3b: 100, (200, (12));
|
80
|
+
|
81
|
+
$list-4a: null, (false, (false));
|
82
|
+
$list-4b: null, (null, (false));
|
83
|
+
|
84
|
+
@include should( expect( $list-1a ), not-to( deep-equal( $list-1b )));
|
85
|
+
@include should( expect( $list-2a ), not-to( deep-equal( $list-2b )));
|
86
|
+
@include should( expect( $list-3a ), not-to( deep-equal( $list-3b )));
|
87
|
+
@include should( expect( $list-4a ), not-to( deep-equal( $list-4b )));
|
88
|
+
}
|
89
|
+
|
90
|
+
@include it("should expect an equal non-deep list to be deep equal") {
|
91
|
+
$list-1a: true, false, true;
|
92
|
+
$list-1b: true, false, true;
|
93
|
+
|
94
|
+
$list-2a: "foo", "bar", "baz";
|
95
|
+
$list-2b: "foo", "bar", "baz";
|
96
|
+
|
97
|
+
$list-3a: 100, 0.2, 12;
|
98
|
+
$list-3b: 100, 0.2, 12;
|
99
|
+
|
100
|
+
$list-4a: false, null, false;
|
101
|
+
$list-4b: false, null, false;
|
102
|
+
|
103
|
+
@include should( expect( $list-1a ), to( deep-equal( $list-1b )));
|
104
|
+
@include should( expect( $list-2a ), to( deep-equal( $list-2b )));
|
105
|
+
@include should( expect( $list-3a ), to( deep-equal( $list-3b )));
|
106
|
+
@include should( expect( $list-4a ), to( deep-equal( $list-4b )));
|
107
|
+
}
|
108
|
+
|
109
|
+
@include it("should expect an unequal non-deep list to be deep equal") {
|
110
|
+
$list-1a: true, false, true;
|
111
|
+
$list-1b: true, true, true;
|
112
|
+
|
113
|
+
$list-2a: "foo", "bar", "baz";
|
114
|
+
$list-2b: "foo", "cha", "baz";
|
115
|
+
|
116
|
+
$list-3a: 100, 0.2, 12;
|
117
|
+
$list-3b: 200, 0.2, 12;
|
118
|
+
|
119
|
+
$list-4a: false, null, false;
|
120
|
+
$list-4b: false, false, false;
|
121
|
+
|
122
|
+
@include should( expect( $list-1a ), not-to( deep-equal( $list-1b )));
|
123
|
+
@include should( expect( $list-2a ), not-to( deep-equal( $list-2b )));
|
124
|
+
@include should( expect( $list-3a ), not-to( deep-equal( $list-3b )));
|
125
|
+
@include should( expect( $list-4a ), not-to( deep-equal( $list-4b )));
|
126
|
+
}
|
127
|
+
|
128
|
+
@include it("should expect other equal values to be deep equal") {
|
129
|
+
@include should( expect( true ), to( deep-equal( true )));
|
130
|
+
@include should( expect( "foo" ), to( deep-equal( "foo" )));
|
131
|
+
@include should( expect( 1 ), to( deep-equal( 1 )));
|
132
|
+
@include should( expect( null ), to( deep-equal( null )));
|
133
|
+
@include should( expect( false ), to( deep-equal( false )));
|
134
|
+
}
|
135
|
+
|
136
|
+
@include it("should expect other unequal values to be deep equal") {
|
137
|
+
@include should( expect( true ), not-to( deep-equal( false )));
|
138
|
+
@include should( expect( "foo" ), not-to( deep-equal( "bar" )));
|
139
|
+
@include should( expect( 1 ), not-to( deep-equal( 2 )));
|
140
|
+
@include should( expect( null ), not-to( deep-equal( false )));
|
141
|
+
@include should( expect( false ), not-to( deep-equal( null )));
|
142
|
+
}
|
143
|
+
|
144
|
+
@include it("should expect empty lists to be deep equal") {
|
145
|
+
@include should( expect( () ), to( deep-equal( () )));
|
146
|
+
@include should( expect( () ), to( deep-equal( () )));
|
147
|
+
@include should( expect( () ), to( deep-equal( () )));
|
148
|
+
@include should( expect( () ), to( deep-equal( () )));
|
149
|
+
@include should( expect( () ), to( deep-equal( () )));
|
150
|
+
}
|
151
|
+
}
|
@@ -0,0 +1,31 @@
|
|
1
|
+
@include describe("Have length of") {
|
2
|
+
@include it("should expect equal length lists to have length of") {
|
3
|
+
@include should( expect( (1, 2, 3) ), to( have-length-of(3)));
|
4
|
+
@include should( expect( (1) ), to( have-length-of(1)));
|
5
|
+
@include should( expect( () ), to( have-length-of(0)));
|
6
|
+
}
|
7
|
+
|
8
|
+
@include it("should expect longer lists not to have length of") {
|
9
|
+
@include should( expect( (1, 2, 3) ), not-to( have-length-of( 2)));
|
10
|
+
@include should( expect( (1) ), not-to( have-length-of( 0)));
|
11
|
+
@include should( expect( () ), not-to( have-length-of(-1)));
|
12
|
+
}
|
13
|
+
|
14
|
+
@include it("should expect shorter lists not to have length of") {
|
15
|
+
@include should( expect( (1, 2, 3) ), not-to( have-length-of(4)));
|
16
|
+
@include should( expect( (1) ), not-to( have-length-of(2)));
|
17
|
+
@include should( expect( () ), not-to( have-length-of(1)));
|
18
|
+
}
|
19
|
+
|
20
|
+
@include it("should expect other values to have length of 1") {
|
21
|
+
@include should( expect( null ), to( have-length-of(1)));
|
22
|
+
@include should( expect( false ), to( have-length-of(1)));
|
23
|
+
@include should( expect( "string" ), to( have-length-of(1)));
|
24
|
+
}
|
25
|
+
|
26
|
+
@include it("should expect other values not to have length of 0") {
|
27
|
+
@include should( expect( null ), not-to( have-length-of(0)));
|
28
|
+
@include should( expect( false ), not-to( have-length-of(0)));
|
29
|
+
@include should( expect( "string" ), not-to( have-length-of(0)));
|
30
|
+
}
|
31
|
+
}
|
@@ -0,0 +1,24 @@
|
|
1
|
+
@include describe("Be close to") {
|
2
|
+
@include it("should expect close numbers to be close to") {
|
3
|
+
@include should( expect( 1 ), to( be-close-to( 1.01, 1 )));
|
4
|
+
@include should( expect( 1 ), to( be-close-to( 0.99, 1 )));
|
5
|
+
@include should( expect( 1 ), to( be-close-to( 0.90, 0 )));
|
6
|
+
@include should( expect( 1 ), to( be-close-to( 2.00, -1 )));
|
7
|
+
@include should( expect( 1 ), to( be-close-to( 0.00, -1 )));
|
8
|
+
}
|
9
|
+
|
10
|
+
@include it("should expect far numbers not to be close to") {
|
11
|
+
@include should( expect( 1 ), not-to( be-close-to( 1.10, 1 )));
|
12
|
+
@include should( expect( 1 ), not-to( be-close-to( 0.90, 1 )));
|
13
|
+
@include should( expect( 1 ), not-to( be-close-to( 2.00, 0 )));
|
14
|
+
@include should( expect( 1 ), not-to( be-close-to( 30.00, -1 )));
|
15
|
+
@include should( expect( 1 ), not-to( be-close-to( -10.00, -1 )));
|
16
|
+
}
|
17
|
+
|
18
|
+
@include it("should expect non-numbers not to be close to") {
|
19
|
+
@include should( expect( a ), not-to( be-close-to( 1, 1 )));
|
20
|
+
@include should( expect( true ), not-to( be-close-to( 1, 1 )));
|
21
|
+
@include should( expect( false ), not-to( be-close-to( 1, 1 )));
|
22
|
+
@include should( expect( null ), not-to( be-close-to( 1, 1 )));
|
23
|
+
}
|
24
|
+
}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
@include describe("Be greater than") {
|
2
|
+
@include it("should expect larger numbers to be greater than") {
|
3
|
+
@include should( expect( 2 ), to( be-greater-than( 1 )));
|
4
|
+
@include should( expect( 0 ), to( be-greater-than( -1 )));
|
5
|
+
}
|
6
|
+
|
7
|
+
@include it("should expect smaller numbers not to be greater than") {
|
8
|
+
@include should( expect( 1 ), not-to( be-greater-than( 2 )));
|
9
|
+
@include should( expect( -1 ), not-to( be-greater-than( 0 )));
|
10
|
+
}
|
11
|
+
|
12
|
+
@include it("should expect non-numbers not to be greater than") {
|
13
|
+
@include should( expect( "foo" ), not-to( be-greater-than( 1 )));
|
14
|
+
@include should( expect( false ), not-to( be-greater-than( 1 )));
|
15
|
+
}
|
16
|
+
}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
@include describe("Be less than") {
|
2
|
+
@include it("should expect smaller numbers to be less than") {
|
3
|
+
@include should( expect( 1 ), to( be-less-than( 2 )));
|
4
|
+
@include should( expect( -1 ), to( be-less-than( 0 )));
|
5
|
+
}
|
6
|
+
|
7
|
+
@include it("should expect larger numbers not to be less than") {
|
8
|
+
@include should( expect( 2 ), not-to( be-less-than( 1 )));
|
9
|
+
@include should( expect( 0 ), not-to( be-less-than( -1 )));
|
10
|
+
}
|
11
|
+
|
12
|
+
@include it("should expect non-numbers not to be less than") {
|
13
|
+
@include should( expect( "foo" ), not-to( be-less-than( 1 )));
|
14
|
+
@include should( expect( false ), not-to( be-less-than( 1 )));
|
15
|
+
}
|
16
|
+
}
|
@@ -0,0 +1,14 @@
|
|
1
|
+
@include describe("Be Undefined") {
|
2
|
+
@include it("should expect falsy values to be falsy") {
|
3
|
+
@include should( expect( false ), to( be-falsy()));
|
4
|
+
@include should( expect( null ), to( be-falsy()));
|
5
|
+
|
6
|
+
}
|
7
|
+
|
8
|
+
@include it("should expect truthy values not to be falsy") {
|
9
|
+
@include should( expect( true ), not-to( be-falsy()));
|
10
|
+
@include should( expect( 0 ), not-to( be-falsy()));
|
11
|
+
@include should( expect( 1 ), not-to( be-falsy()));
|
12
|
+
@include should( expect( "" ), not-to( be-falsy()));
|
13
|
+
}
|
14
|
+
}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
@include describe("Be Null") {
|
2
|
+
@include it("should expect null to be null") {
|
3
|
+
@include should( expect( null ), to( be-null()));
|
4
|
+
}
|
5
|
+
|
6
|
+
@include it("should expect other values not to be null") {
|
7
|
+
@include should( expect( 1 ), not-to( be-null()));
|
8
|
+
@include should( expect( a ), not-to( be-null()));
|
9
|
+
@include should( expect( true ), not-to( be-null()));
|
10
|
+
@include should( expect( false ), not-to( be-null()));
|
11
|
+
@include should( expect( "" ), not-to( be-null()));
|
12
|
+
}
|
13
|
+
}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
@include describe("Be Undefined") {
|
2
|
+
@include it("should expect truthy values to be truthy") {
|
3
|
+
@include should( expect( true ), to( be-truthy()));
|
4
|
+
@include should( expect( 0 ), to( be-truthy()));
|
5
|
+
@include should( expect( 1 ), to( be-truthy()));
|
6
|
+
@include should( expect( "" ), to( be-truthy()));
|
7
|
+
}
|
8
|
+
|
9
|
+
@include it("should expect falsy values not to be truthy") {
|
10
|
+
@include should( expect( false ), not-to( be-truthy()));
|
11
|
+
@include should( expect( null ), not-to( be-truthy()));
|
12
|
+
}
|
13
|
+
}
|
@@ -0,0 +1,17 @@
|
|
1
|
+
@include describe("Be Type") {
|
2
|
+
@include it("should expect to have type of") {
|
3
|
+
@include should( expect( 1 ), to( have-type-of("number") ));
|
4
|
+
@include should( expect( true ), to( have-type-of("bool") ));
|
5
|
+
@include should( expect( (1, 2) ), to( have-type-of("list") ));
|
6
|
+
@include should( expect( "foo" ), to( have-type-of("string") ));
|
7
|
+
@include should( expect( #eee ), to( have-type-of("color") ));
|
8
|
+
}
|
9
|
+
|
10
|
+
@include it("should expect not to have type of") {
|
11
|
+
@include should( expect( 1 ), not-to( have-type-of("bool") ));
|
12
|
+
@include should( expect( true ), not-to( have-type-of("list") ));
|
13
|
+
@include should( expect( (1, 2) ), not-to( have-type-of("string") ));
|
14
|
+
@include should( expect( "foo" ), not-to( have-type-of("color") ));
|
15
|
+
@include should( expect( #eee ), not-to( have-type-of("number") ));
|
16
|
+
}
|
17
|
+
}
|
@@ -0,0 +1,45 @@
|
|
1
|
+
@import "bootcamp";
|
2
|
+
|
3
|
+
$bc-setting-verbose: false;
|
4
|
+
$bc-setting-warnings: false;
|
5
|
+
|
6
|
+
@include runner-start;
|
7
|
+
|
8
|
+
@import "core/mixins/describe";
|
9
|
+
@import "core/mixins/it";
|
10
|
+
@import "core/mixins/should";
|
11
|
+
@import "core/mixins/xdescribe";
|
12
|
+
@import "core/mixins/xit";
|
13
|
+
|
14
|
+
@import "core/functions/actual";
|
15
|
+
@import "core/functions/expect";
|
16
|
+
@import "core/functions/not-to";
|
17
|
+
@import "core/functions/should";
|
18
|
+
@import "core/functions/to";
|
19
|
+
|
20
|
+
@import "utils/contain";
|
21
|
+
@import "utils/equal";
|
22
|
+
@import "utils/list-join";
|
23
|
+
@import "utils/power";
|
24
|
+
|
25
|
+
@import "matchers/be";
|
26
|
+
@import "matchers/equal";
|
27
|
+
|
28
|
+
@import "matchers/lists/be-empty";
|
29
|
+
@import "matchers/lists/be-longer-than";
|
30
|
+
@import "matchers/lists/be-shorter-than";
|
31
|
+
@import "matchers/lists/contain";
|
32
|
+
@import "matchers/lists/deep-contain";
|
33
|
+
@import "matchers/lists/deep-equal";
|
34
|
+
@import "matchers/lists/have-length-of";
|
35
|
+
|
36
|
+
@import "matchers/numbers/be-close-to";
|
37
|
+
@import "matchers/numbers/be-greater-than";
|
38
|
+
@import "matchers/numbers/be-less-than";
|
39
|
+
|
40
|
+
@import "matchers/types/be-falsy";
|
41
|
+
@import "matchers/types/be-null";
|
42
|
+
@import "matchers/types/be-truthy";
|
43
|
+
@import "matchers/types/have-type-of";
|
44
|
+
|
45
|
+
@include runner-end;
|
@@ -0,0 +1,41 @@
|
|
1
|
+
@include describe("Contain Util") {
|
2
|
+
@include it("should return true for lists that contain a value") {
|
3
|
+
$list-1: 1, 2, 3;
|
4
|
+
$list-2: "foo", "bar", "baz";
|
5
|
+
$list-3: true, false, true;
|
6
|
+
|
7
|
+
@include should(expect( bc-util-contain( $list-1, 2 ) ), to( be( true )));
|
8
|
+
@include should(expect( bc-util-contain( $list-2, "bar" ) ), to( be( true )));
|
9
|
+
@include should(expect( bc-util-contain( $list-3, false ) ), to( be( true )));
|
10
|
+
}
|
11
|
+
|
12
|
+
@include it("should return false for lists that do not contain a value") {
|
13
|
+
$list-1: 1, 2, 3;
|
14
|
+
$list-2: "foo", "bar", "baz";
|
15
|
+
$list-3: true, false, true;
|
16
|
+
|
17
|
+
@include should(expect( bc-util-contain( $list-1, 4 ) ), to( be( false )));
|
18
|
+
@include should(expect( bc-util-contain( $list-2, "tah" ) ), to( be( false )));
|
19
|
+
@include should(expect( bc-util-contain( $list-3, null ) ), to( be( false )));
|
20
|
+
}
|
21
|
+
|
22
|
+
@include it("should return true for lists that deep contain a value") {
|
23
|
+
$list-1: 1, (2, 3);
|
24
|
+
$list-2: "foo", ("bar", "baz");
|
25
|
+
$list-3: true, (false, true);
|
26
|
+
|
27
|
+
@include should(expect( bc-util-contain( $list-1, 2, $recursive: true ) ), to( be( true )));
|
28
|
+
@include should(expect( bc-util-contain( $list-2, "bar", $recursive: true ) ), to( be( true )));
|
29
|
+
@include should(expect( bc-util-contain( $list-3, false, $recursive: true ) ), to( be( true )));
|
30
|
+
}
|
31
|
+
|
32
|
+
@include it("should return false for lists that do not deep contain a value") {
|
33
|
+
$list-1: 1, (2, 3);
|
34
|
+
$list-2: "foo", ("bar", "baz");
|
35
|
+
$list-3: true, (false, true);
|
36
|
+
|
37
|
+
@include should(expect( bc-util-contain( $list-1, 4, $recursive: true ) ), to( be( false )));
|
38
|
+
@include should(expect( bc-util-contain( $list-2, "tah", $recursive: true ) ), to( be( false )));
|
39
|
+
@include should(expect( bc-util-contain( $list-3, null, $recursive: true ) ), to( be( false )));
|
40
|
+
}
|
41
|
+
}
|
@@ -0,0 +1,79 @@
|
|
1
|
+
@include describe("Equal Util") {
|
2
|
+
@include it("should return true for lists that are equal") {
|
3
|
+
$list-1: 1, 2, 3;
|
4
|
+
$list-2: "foo", "bar", "baz";
|
5
|
+
$list-3: true, false, true;
|
6
|
+
|
7
|
+
@include should(expect( bc-util-equal( $list-1, $list-1 ) ), to( be( true )));
|
8
|
+
@include should(expect( bc-util-equal( $list-2, $list-2 ) ), to( be( true )));
|
9
|
+
@include should(expect( bc-util-equal( $list-3, $list-3 ) ), to( be( true )));
|
10
|
+
}
|
11
|
+
|
12
|
+
@include it("should return false for lists that are not equal") {
|
13
|
+
$list-1a: 1, 2, 3;
|
14
|
+
$list-1b: 3, 2, 1;
|
15
|
+
|
16
|
+
$list-2a: "foo", "bar", "baz";
|
17
|
+
$list-2b: "baz", "bar", "foo";
|
18
|
+
|
19
|
+
$list-3a: true, false, true;
|
20
|
+
$list-3b: false, true, false;
|
21
|
+
|
22
|
+
@include should(expect( bc-util-equal( $list-1a, $list-1b ) ), to( be( false )));
|
23
|
+
@include should(expect( bc-util-equal( $list-2a, $list-2b ) ), to( be( false )));
|
24
|
+
@include should(expect( bc-util-equal( $list-3a, $list-3b ) ), to( be( false )));
|
25
|
+
}
|
26
|
+
|
27
|
+
@include it("should return true for deep lists that are equal") {
|
28
|
+
$list-1: 1, (2, 3);
|
29
|
+
$list-2: "foo", ("bar", "baz");
|
30
|
+
$list-3: true, (false, true);
|
31
|
+
|
32
|
+
@include should(expect( bc-util-equal( $list-1, $list-1 ) ), to( be( true )));
|
33
|
+
@include should(expect( bc-util-equal( $list-2, $list-2 ) ), to( be( true )));
|
34
|
+
@include should(expect( bc-util-equal( $list-3, $list-3 ) ), to( be( true )));
|
35
|
+
}
|
36
|
+
|
37
|
+
@include it("should return false for deep lists that are not equal") {
|
38
|
+
$list-1a: 1, (2, 3);
|
39
|
+
$list-1b: 1, (3, 2);
|
40
|
+
|
41
|
+
$list-2a: "foo", ("bar", "baz");
|
42
|
+
$list-2b: "foo", ("baz", "bar");
|
43
|
+
|
44
|
+
$list-3a: true, (false, true);
|
45
|
+
$list-3b: true, (true, false);
|
46
|
+
|
47
|
+
@include should(expect( bc-util-equal( $list-1a, $list-1b ) ), to( be( false )));
|
48
|
+
@include should(expect( bc-util-equal( $list-2a, $list-2b ) ), to( be( false )));
|
49
|
+
@include should(expect( bc-util-equal( $list-3a, $list-3b ) ), to( be( false )));
|
50
|
+
}
|
51
|
+
|
52
|
+
@include it("should return true for lists that are equal and have different list seperators") {
|
53
|
+
$list-1a: 1 2 3;
|
54
|
+
$list-1b: 1, 2, 3;
|
55
|
+
$list-2a: "foo" "bar" "baz";
|
56
|
+
$list-2b: "foo", "bar", "baz";
|
57
|
+
$list-3a: true false true;
|
58
|
+
$list-3b: true, false, true;
|
59
|
+
|
60
|
+
@include should(expect( bc-util-equal( $list-1a, $list-1b ) ), to( be( true )));
|
61
|
+
@include should(expect( bc-util-equal( $list-2a, $list-2b ) ), to( be( true )));
|
62
|
+
@include should(expect( bc-util-equal( $list-3a, $list-3b ) ), to( be( true )));
|
63
|
+
}
|
64
|
+
|
65
|
+
@include it("should return false for lists that are not equal and have different list seperators") {
|
66
|
+
$list-1a: 1 2 3;
|
67
|
+
$list-1b: 3, 2, 1;
|
68
|
+
|
69
|
+
$list-2a: "foo" "bar" "baz";
|
70
|
+
$list-2b: "baz", "bar", "foo";
|
71
|
+
|
72
|
+
$list-3a: true false true;
|
73
|
+
$list-3b: false, true, false;
|
74
|
+
|
75
|
+
@include should(expect( bc-util-equal( $list-1a, $list-1b ) ), to( be( false )));
|
76
|
+
@include should(expect( bc-util-equal( $list-2a, $list-2b ) ), to( be( false )));
|
77
|
+
@include should(expect( bc-util-equal( $list-3a, $list-3b ) ), to( be( false )));
|
78
|
+
}
|
79
|
+
}
|
@@ -0,0 +1,39 @@
|
|
1
|
+
@include describe("List Join Util") {
|
2
|
+
@include it("should join an list") {
|
3
|
+
$list-1: 1, 2, 3;
|
4
|
+
$list-2: "foo", "bar", "baz";
|
5
|
+
$list-3: true, false, true;
|
6
|
+
|
7
|
+
@include should(expect( bc-util-list-join($list-1, " ") ), to( be( "1 2 3" )));
|
8
|
+
@include should(expect( bc-util-list-join($list-2, " ") ), to( be( "foo bar baz" )));
|
9
|
+
@include should(expect( bc-util-list-join($list-3, " ") ), to( be( "true false true" )));
|
10
|
+
}
|
11
|
+
|
12
|
+
@include it("should work with any seperator") {
|
13
|
+
$list: 1, 2, 3;
|
14
|
+
|
15
|
+
@include should(expect( bc-util-list-join($list, "-") ), to( be( "1-2-3" )));
|
16
|
+
@include should(expect( bc-util-list-join($list, true) ), to( be( "1true2true3" )));
|
17
|
+
}
|
18
|
+
|
19
|
+
@include it("should slice a list at start point") {
|
20
|
+
$list: 1, 2, 3, 4, 5;
|
21
|
+
|
22
|
+
@include should(expect( bc-util-list-join($list, " ", $slice-start: 3) ), to( be( "3 4 5" )));
|
23
|
+
@include should(expect( bc-util-list-join($list, " ", $slice-start: 2) ), to( be( "2 3 4 5" )));
|
24
|
+
}
|
25
|
+
|
26
|
+
@include it("should slice a list at the end point") {
|
27
|
+
$list: 1, 2, 3, 4, 5;
|
28
|
+
|
29
|
+
@include should(expect( bc-util-list-join($list, " ", $slice-end: 2) ), to( be( "1 2 3" )));
|
30
|
+
@include should(expect( bc-util-list-join($list, " ", $slice-end: 3) ), to( be( "1 2" )));
|
31
|
+
}
|
32
|
+
|
33
|
+
@include it("should slice a list at start and end points") {
|
34
|
+
$list: 1, 2, 3, 4, 5;
|
35
|
+
|
36
|
+
@include should(expect( bc-util-list-join($list, " ", $slice-start: 2, $slice-end: 2) ), to( be( "2 3" )));
|
37
|
+
@include should(expect( bc-util-list-join($list, " ", $slice-start: 3, $slice-end: 1) ), to( be( "3 4" )));
|
38
|
+
}
|
39
|
+
}
|