aloha_analyzer 0.1.0 → 0.1.1
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.
- checksums.yaml +4 -4
- data/lib/aloha_analyzer/user.rb +1 -0
- data/lib/aloha_analyzer/version.rb +1 -1
- data/spec/aloha_analyzer/user_spec.rb +30 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f719ac055973430d7ee137a7068a06353a318a32
|
4
|
+
data.tar.gz: c8f4263db94e40629ddba48bf597abb97ff887a4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6363b29bad4f448c625400e3fa144be1e6e82d0c704e7c6d403ebc23a29c0ce1e0f020d060feb16e57478cf24baeafa664351a2a2660dea044ac08af957c610d
|
7
|
+
data.tar.gz: 751ebf163910a7aafe599bff0e34496d2c386b1525532da3b4bc9d0d138f693267c5d5b572cc7d1ab88e07589131a756e1aedda01a6a540c5a59d692781c8bd1
|
data/lib/aloha_analyzer/user.rb
CHANGED
@@ -57,6 +57,12 @@ describe AlohaAnalyzer::User do
|
|
57
57
|
subject[:without_user_language]['languages'].should eq({})
|
58
58
|
subject[:without_user_language]['count'].should eq 0
|
59
59
|
end
|
60
|
+
|
61
|
+
it 'includes the user lanugage' do
|
62
|
+
subject[:user_language].should eq(
|
63
|
+
"abbreviation"=>"en", "name"=>"English", "population"=>238000000, "countries"=>"USA, Canada, UK, Ireland, Australia"
|
64
|
+
)
|
65
|
+
end
|
60
66
|
end
|
61
67
|
|
62
68
|
context 'when users' do
|
@@ -74,6 +80,12 @@ describe AlohaAnalyzer::User do
|
|
74
80
|
subject.should be_a Hash
|
75
81
|
end
|
76
82
|
|
83
|
+
it 'includes the user lanugage' do
|
84
|
+
subject[:user_language].should eq(
|
85
|
+
"abbreviation"=>"en", "name"=>"English", "population"=>238000000, "countries"=>"USA, Canada, UK, Ireland, Australia"
|
86
|
+
)
|
87
|
+
end
|
88
|
+
|
77
89
|
it 'returns results based on the user language' do
|
78
90
|
subject[:with_user_language].should == {
|
79
91
|
'count' => 4,
|
@@ -133,6 +145,12 @@ describe AlohaAnalyzer::User do
|
|
133
145
|
subject.should be_a Hash
|
134
146
|
end
|
135
147
|
|
148
|
+
it 'includes the user lanugage' do
|
149
|
+
subject[:user_language].should eq(
|
150
|
+
"abbreviation"=>"en", "name"=>"English", "population"=>238000000, "countries"=>"USA, Canada, UK, Ireland, Australia"
|
151
|
+
)
|
152
|
+
end
|
153
|
+
|
136
154
|
it 'returns results based on the user language' do
|
137
155
|
subject[:with_user_language].should == {
|
138
156
|
'count' => 2,
|
@@ -165,6 +183,12 @@ describe AlohaAnalyzer::User do
|
|
165
183
|
subject.should be_a Hash
|
166
184
|
end
|
167
185
|
|
186
|
+
it 'includes the user lanugage' do
|
187
|
+
subject[:user_language].should eq(
|
188
|
+
"abbreviation"=>"en", "name"=>"English", "population"=>238000000, "countries"=>"USA, Canada, UK, Ireland, Australia"
|
189
|
+
)
|
190
|
+
end
|
191
|
+
|
168
192
|
it 'returns results based on the user language' do
|
169
193
|
subject[:with_user_language].should == {
|
170
194
|
'count' => 2,
|
@@ -216,6 +240,12 @@ describe AlohaAnalyzer::User do
|
|
216
240
|
]
|
217
241
|
}
|
218
242
|
|
243
|
+
it 'includes the user lanugage' do
|
244
|
+
subject[:user_language].should eq(
|
245
|
+
"abbreviation"=>"en", "name"=>"English", "population"=>238000000, "countries"=>"USA, Canada, UK, Ireland, Australia"
|
246
|
+
)
|
247
|
+
end
|
248
|
+
|
219
249
|
it 'merges english and british' do
|
220
250
|
subject[:with_user_language].should == {
|
221
251
|
'count' => 3,
|