cohort_analysis 1.0.2 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +7 -1
- data/lib/cohort_analysis/strategy.rb +1 -1
- data/lib/cohort_analysis/version.rb +1 -1
- data/test/test_cohort_analysis.rb +9 -0
- metadata +1 -1
data/CHANGELOG
CHANGED
@@ -51,6 +51,15 @@ shared_examples_for 'an adapter the provides #cohort' do
|
|
51
51
|
assert_count 1, model.cohort(:dest => ['MSN','SFO'])
|
52
52
|
end
|
53
53
|
|
54
|
+
it "handles ranges of values" do
|
55
|
+
FactoryGirl.create(:lax_ord, :year => 20)
|
56
|
+
FactoryGirl.create(:lax_ord, :year => 15)
|
57
|
+
FactoryGirl.create(:lax_ord, :year => 10)
|
58
|
+
assert_count 3, model.cohort(:year => 10..20)
|
59
|
+
assert_count 2, model.cohort(:year => 11..20)
|
60
|
+
assert_count 1, model.cohort(:year => 11..19)
|
61
|
+
end
|
62
|
+
|
54
63
|
it "matches everything if empty characteristics" do
|
55
64
|
FactoryGirl.create(:lax_ord)
|
56
65
|
FactoryGirl.create(:lax_sfo)
|