flint-gs 2.3.6 → 2.3.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (154) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE +21 -21
  3. data/README.md +99 -98
  4. data/lib/flint-gs.rb +8 -0
  5. data/lib/flint.rb +22 -16
  6. data/lib/flint/functions.rb +99 -99
  7. data/lib/flint/version.rb +3 -3
  8. data/stylesheets/_flint.scss +7 -7
  9. data/stylesheets/flint/config/_config.scss +56 -56
  10. data/stylesheets/flint/functions/_functions.scss +48 -48
  11. data/stylesheets/flint/functions/helpers/_helpers.scss +229 -229
  12. data/stylesheets/flint/functions/lib/_calc-breakpoint.scss +47 -47
  13. data/stylesheets/flint/functions/lib/_calc-width.scss +70 -70
  14. data/stylesheets/flint/functions/lib/_fluid-width.scss +15 -15
  15. data/stylesheets/flint/functions/lib/_get-index.scss +21 -21
  16. data/stylesheets/flint/functions/lib/_get-instance-value.scss +15 -15
  17. data/stylesheets/flint/functions/lib/_get-value.scss +14 -14
  18. data/stylesheets/flint/functions/lib/_has-family-instance.scss +84 -84
  19. data/stylesheets/flint/functions/lib/_html-encode.scss +14 -14
  20. data/stylesheets/flint/functions/lib/_instance.scss +48 -48
  21. data/stylesheets/flint/functions/lib/_last.scss +14 -14
  22. data/stylesheets/flint/functions/lib/_list-to-str.scss +38 -38
  23. data/stylesheets/flint/functions/lib/_map-fetch.scss +31 -31
  24. data/stylesheets/flint/functions/lib/_next-index.scss +14 -14
  25. data/stylesheets/flint/functions/lib/_purge.scss +24 -24
  26. data/stylesheets/flint/functions/lib/_remove.scss +18 -18
  27. data/stylesheets/flint/functions/lib/_replace.scss +30 -30
  28. data/stylesheets/flint/functions/lib/_steal-key.scss +32 -32
  29. data/stylesheets/flint/functions/lib/_steal-values.scss +15 -15
  30. data/stylesheets/flint/functions/lib/_str-replace.scss +39 -39
  31. data/stylesheets/flint/functions/lib/_str-to-list.scss +89 -89
  32. data/stylesheets/flint/functions/lib/_support-syntax-bem.scss +37 -37
  33. data/stylesheets/flint/functions/lib/_support-syntax.scss +31 -31
  34. data/stylesheets/flint/functions/lib/_types-in-list.scss +76 -76
  35. data/stylesheets/flint/functions/lib/_use-syntax.scss +22 -22
  36. data/stylesheets/flint/globals/_globals.scss +122 -122
  37. data/stylesheets/flint/mixins/_mixins.scss +11 -11
  38. data/stylesheets/flint/mixins/lib/_box-sizing.scss +18 -18
  39. data/stylesheets/flint/mixins/lib/_calculate.scss +241 -241
  40. data/stylesheets/flint/mixins/lib/_clearfix.scss +29 -29
  41. data/stylesheets/flint/mixins/lib/_container.scss +45 -45
  42. data/stylesheets/flint/mixins/lib/_grid-overlay.scss +73 -73
  43. data/stylesheets/flint/mixins/lib/_main.scss +1057 -1057
  44. data/stylesheets/flint/mixins/lib/_new-instance.scss +28 -28
  45. data/stylesheets/flint/mixins/lib/_print-instance.scss +44 -44
  46. data/tests/config.rb +22 -34
  47. data/tests/input/functions/_functions.scss +47 -47
  48. data/tests/input/functions/helpers/_helpers.scss +437 -437
  49. data/tests/input/functions/lib/_calc-breakpoint.scss +62 -62
  50. data/tests/input/functions/lib/_calc-width.scss +195 -195
  51. data/tests/input/functions/lib/_fluid-width.scss +32 -32
  52. data/tests/input/functions/lib/_get-index.scss +31 -31
  53. data/tests/input/functions/lib/_get-instance-value.scss +72 -72
  54. data/tests/input/functions/lib/_get-value.scss +28 -28
  55. data/tests/input/functions/lib/_has-family-instance.scss +35 -35
  56. data/tests/input/functions/lib/_instance.scss +187 -187
  57. data/tests/input/functions/lib/_last.scss +18 -18
  58. data/tests/input/functions/lib/_list-to-str.scss +28 -28
  59. data/tests/input/functions/lib/_map-fetch.scss +34 -34
  60. data/tests/input/functions/lib/_next-index.scss +24 -24
  61. data/tests/input/functions/lib/_purge.scss +14 -14
  62. data/tests/input/functions/lib/_remove.scss +14 -14
  63. data/tests/input/functions/lib/_replace.scss +14 -14
  64. data/tests/input/functions/lib/_steal-key.scss +19 -19
  65. data/tests/input/functions/lib/_steal-values.scss +16 -16
  66. data/tests/input/functions/lib/_str-replace.scss +14 -14
  67. data/tests/input/functions/lib/_str-to-list.scss +28 -28
  68. data/tests/input/functions/lib/_support-syntax-bem.scss +14 -14
  69. data/tests/input/functions/lib/_support-syntax.scss +21 -21
  70. data/tests/input/functions/lib/_types-in-list.scss +50 -50
  71. data/tests/input/functions/lib/_use-syntax.scss +14 -14
  72. data/tests/input/output.scss +250 -250
  73. data/tests/output/output.css +3499 -3499
  74. data/tests/tests.html +110 -110
  75. metadata +12 -212
  76. data/tests/bootcamp/CHANGELOG.md +0 -70
  77. data/tests/bootcamp/CONTRIBUTING.md +0 -72
  78. data/tests/bootcamp/Gruntfile.coffee +0 -34
  79. data/tests/bootcamp/LICENSE.md +0 -7
  80. data/tests/bootcamp/README.md +0 -52
  81. data/tests/bootcamp/bower.json +0 -15
  82. data/tests/bootcamp/dist/_bootcamp.scss +0 -46
  83. data/tests/bootcamp/dist/bootcamp.coffee +0 -101
  84. data/tests/bootcamp/dist/core/functions/_actual.scss +0 -3
  85. data/tests/bootcamp/dist/core/functions/_error.scss +0 -29
  86. data/tests/bootcamp/dist/core/functions/_expect.scss +0 -6
  87. data/tests/bootcamp/dist/core/functions/_not-to.scss +0 -5
  88. data/tests/bootcamp/dist/core/functions/_should.scss +0 -6
  89. data/tests/bootcamp/dist/core/functions/_to.scss +0 -5
  90. data/tests/bootcamp/dist/core/mixins/_describe.scss +0 -31
  91. data/tests/bootcamp/dist/core/mixins/_it.scss +0 -31
  92. data/tests/bootcamp/dist/core/mixins/_runner.scss +0 -28
  93. data/tests/bootcamp/dist/core/mixins/_should.scss +0 -46
  94. data/tests/bootcamp/dist/core/mixins/_xdescribe.scss +0 -9
  95. data/tests/bootcamp/dist/core/mixins/_xit.scss +0 -9
  96. data/tests/bootcamp/dist/core/variables/_helpers.scss +0 -5
  97. data/tests/bootcamp/dist/core/variables/_settings.scss +0 -2
  98. data/tests/bootcamp/dist/core/variables/_should.scss +0 -6
  99. data/tests/bootcamp/dist/core/variables/_trackers.scss +0 -6
  100. data/tests/bootcamp/dist/lib/_sassyjson.scss +0 -1075
  101. data/tests/bootcamp/dist/matchers/_be.scss +0 -3
  102. data/tests/bootcamp/dist/matchers/_equal.scss +0 -3
  103. data/tests/bootcamp/dist/matchers/lists/_be-empty.scss +0 -3
  104. data/tests/bootcamp/dist/matchers/lists/_be-longer-than.scss +0 -3
  105. data/tests/bootcamp/dist/matchers/lists/_be-shorter-than.scss +0 -3
  106. data/tests/bootcamp/dist/matchers/lists/_contain.scss +0 -3
  107. data/tests/bootcamp/dist/matchers/lists/_deep-contain.scss +0 -3
  108. data/tests/bootcamp/dist/matchers/lists/_deep-equal.scss +0 -47
  109. data/tests/bootcamp/dist/matchers/lists/_have-length-of.scss +0 -3
  110. data/tests/bootcamp/dist/matchers/numbers/_be-close-to.scss +0 -12
  111. data/tests/bootcamp/dist/matchers/numbers/_be-greater-than.scss +0 -12
  112. data/tests/bootcamp/dist/matchers/numbers/_be-less-than.scss +0 -12
  113. data/tests/bootcamp/dist/matchers/types/_be-falsy.scss +0 -3
  114. data/tests/bootcamp/dist/matchers/types/_be-null.scss +0 -3
  115. data/tests/bootcamp/dist/matchers/types/_be-truthy.scss +0 -3
  116. data/tests/bootcamp/dist/matchers/types/_have-type-of.scss +0 -3
  117. data/tests/bootcamp/dist/utils/_contain.scss +0 -15
  118. data/tests/bootcamp/dist/utils/_equal.scss +0 -23
  119. data/tests/bootcamp/dist/utils/_list-join.scss +0 -35
  120. data/tests/bootcamp/dist/utils/_power.scss +0 -15
  121. data/tests/bootcamp/package.json +0 -63
  122. data/tests/bootcamp/tasks/bootcamp.coffee +0 -83
  123. data/tests/bootcamp/test/core/functions/_actual.scss +0 -10
  124. data/tests/bootcamp/test/core/functions/_expect.scss +0 -6
  125. data/tests/bootcamp/test/core/functions/_not-to.scss +0 -5
  126. data/tests/bootcamp/test/core/functions/_should.scss +0 -10
  127. data/tests/bootcamp/test/core/functions/_to.scss +0 -5
  128. data/tests/bootcamp/test/core/mixins/_describe.scss +0 -11
  129. data/tests/bootcamp/test/core/mixins/_it.scss +0 -5
  130. data/tests/bootcamp/test/core/mixins/_should.scss +0 -5
  131. data/tests/bootcamp/test/core/mixins/_xdescribe.scss +0 -28
  132. data/tests/bootcamp/test/core/mixins/_xit.scss +0 -12
  133. data/tests/bootcamp/test/matchers/_be.scss +0 -90
  134. data/tests/bootcamp/test/matchers/_equal.scss +0 -33
  135. data/tests/bootcamp/test/matchers/lists/_be-empty.scss +0 -12
  136. data/tests/bootcamp/test/matchers/lists/_be-longer-than.scss +0 -29
  137. data/tests/bootcamp/test/matchers/lists/_be-shorter-than.scss +0 -29
  138. data/tests/bootcamp/test/matchers/lists/_contain.scss +0 -39
  139. data/tests/bootcamp/test/matchers/lists/_deep-contain.scss +0 -51
  140. data/tests/bootcamp/test/matchers/lists/_deep-equal.scss +0 -151
  141. data/tests/bootcamp/test/matchers/lists/_have-length-of.scss +0 -31
  142. data/tests/bootcamp/test/matchers/numbers/_be-close-to.scss +0 -24
  143. data/tests/bootcamp/test/matchers/numbers/_be-greater-than.scss +0 -16
  144. data/tests/bootcamp/test/matchers/numbers/_be-less-than.scss +0 -16
  145. data/tests/bootcamp/test/matchers/types/_be-falsy.scss +0 -14
  146. data/tests/bootcamp/test/matchers/types/_be-null.scss +0 -13
  147. data/tests/bootcamp/test/matchers/types/_be-truthy.scss +0 -13
  148. data/tests/bootcamp/test/matchers/types/_have-type-of.scss +0 -17
  149. data/tests/bootcamp/test/specs.scss +0 -45
  150. data/tests/bootcamp/test/utils/_contain.scss +0 -41
  151. data/tests/bootcamp/test/utils/_equal.scss +0 -79
  152. data/tests/bootcamp/test/utils/_list-join.scss +0 -39
  153. data/tests/bootcamp/test/utils/_power.scss +0 -13
  154. data/tests/sass-prof.log +0 -0
@@ -1,31 +0,0 @@
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
- }
@@ -1,24 +0,0 @@
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
- }
@@ -1,16 +0,0 @@
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
- }
@@ -1,16 +0,0 @@
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
- }
@@ -1,14 +0,0 @@
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
- }
@@ -1,13 +0,0 @@
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
- }
@@ -1,13 +0,0 @@
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
- }
@@ -1,17 +0,0 @@
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
- }
@@ -1,45 +0,0 @@
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;
@@ -1,41 +0,0 @@
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
- }
@@ -1,79 +0,0 @@
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
- }
@@ -1,39 +0,0 @@
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
- }
@@ -1,13 +0,0 @@
1
- @include describe("Power Util") {
2
- @include it("should expect positive values to be calculated correctly") {
3
- @include should( expect( bc-util-power( 10, 2) ), to( equal( 100 )));
4
- @include should( expect( bc-util-power( 2, 2) ), to( equal( 4 )));
5
- @include should( expect( bc-util-power(0.5, 2) ), to( equal( 0.25 )));
6
- }
7
-
8
- @include it("should expect negative values to be calculated correctly") {
9
- @include should( expect( bc-util-power( 10, -2) ), to( equal( 0.01 )));
10
- @include should( expect( bc-util-power( 2, -2) ), to( equal( 0.25 )));
11
- @include should( expect( bc-util-power(0.5, -2) ), to( equal( 4 )));
12
- }
13
- }
Binary file