prop 0.6.2 → 0.6.3
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 +1 -1
- data/lib/prop.rb +1 -0
- data/prop.gemspec +1 -1
- data/test/test_prop.rb +16 -0
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.6.
|
1
|
+
0.6.3
|
data/lib/prop.rb
CHANGED
data/prop.gemspec
CHANGED
data/test/test_prop.rb
CHANGED
@@ -94,6 +94,22 @@ class TestProp < Test::Unit::TestCase
|
|
94
94
|
end
|
95
95
|
end
|
96
96
|
|
97
|
+
context "#query" do
|
98
|
+
setup do
|
99
|
+
Prop.configure(:hello, :threshold => 20, :interval => 20)
|
100
|
+
Prop.throttle!(:hello)
|
101
|
+
Prop.throttle!(:hello)
|
102
|
+
end
|
103
|
+
|
104
|
+
should "be aliased by #count" do
|
105
|
+
assert_equal Prop.count(:hello), 2
|
106
|
+
end
|
107
|
+
|
108
|
+
should "return the number of hits on a throttle" do
|
109
|
+
assert_equal Prop.query(:hello), 2
|
110
|
+
end
|
111
|
+
end
|
112
|
+
|
97
113
|
context "#throttle!" do
|
98
114
|
should "increment counter correctly" do
|
99
115
|
3.times do |i|
|
metadata
CHANGED