coolerator.vision 0.2.6 → 0.2.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.7
|
data/coolerator.vision.gemspec
CHANGED
@@ -44,8 +44,9 @@
|
|
44
44
|
}
|
45
45
|
|
46
46
|
return {
|
47
|
-
|
48
|
-
|
47
|
+
filters : filters, // TODO: see about removing this... it's currently only need for the specs.
|
48
|
+
before : before,
|
49
|
+
after : after
|
49
50
|
};
|
50
51
|
}
|
51
52
|
},
|
@@ -102,6 +103,6 @@
|
|
102
103
|
return __database__['*'] || [];
|
103
104
|
}
|
104
105
|
|
105
|
-
return $.merge(__database__['*'] || [], __database__[scope] || []);
|
106
|
+
return $.merge($.merge([], __database__['*'] || []), __database__[scope] || []);
|
106
107
|
}
|
107
108
|
})(jQuery);
|
data/script/pair
CHANGED
@@ -75,7 +75,17 @@ Screw.Unit(function(c) { with(c) {
|
|
75
75
|
describe("argument handling", function() {
|
76
76
|
var filters;
|
77
77
|
|
78
|
-
|
78
|
+
before(function() {
|
79
|
+
Coolerator.Filter()
|
80
|
+
.before(function() {})
|
81
|
+
.after (function() {});
|
82
|
+
|
83
|
+
Coolerator.Filter('scoped')
|
84
|
+
.before(function() {})
|
85
|
+
.after (function() {});
|
86
|
+
});
|
87
|
+
|
88
|
+
context("with appropriate arguments (with global)", function() {
|
79
89
|
before(function() {
|
80
90
|
filters = Coolerator.Filters.prepare(view, '*');
|
81
91
|
});
|
@@ -84,7 +94,11 @@ Screw.Unit(function(c) { with(c) {
|
|
84
94
|
expect(view.show.jquery).to_not(be_undefined);
|
85
95
|
});
|
86
96
|
|
87
|
-
describe("the returned
|
97
|
+
describe("the returned filters", function() {
|
98
|
+
it("are limited to global", function() {
|
99
|
+
expect(filters.filters).to(have_length, 1);
|
100
|
+
});
|
101
|
+
|
88
102
|
it("defines #before", function() {
|
89
103
|
expect(filters.before).to_not(throw_exception);
|
90
104
|
});
|
@@ -95,6 +109,16 @@ Screw.Unit(function(c) { with(c) {
|
|
95
109
|
});
|
96
110
|
});
|
97
111
|
|
112
|
+
context("with appropriate arguments (with scoped)", function() {
|
113
|
+
it("does not increase the length upon multiple calls", function() {
|
114
|
+
Coolerator.Filters.prepare(view, 'scoped');
|
115
|
+
Coolerator.Filters.prepare(view, 'scoped');
|
116
|
+
filters = Coolerator.Filters.prepare(view, 'scoped');
|
117
|
+
|
118
|
+
expect(filters.filters).to(have_length, 2);
|
119
|
+
});
|
120
|
+
});
|
121
|
+
|
98
122
|
context("with fewer than two", function() {
|
99
123
|
before(function() {
|
100
124
|
fn = function fn() {
|