entrez 0.5.1 → 0.5.2
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/lib/entrez.rb +2 -0
- data/lib/entrez/version.rb +1 -1
- data/spec/entrez_spec.rb +5 -0
- metadata +1 -1
data/lib/entrez.rb
CHANGED
data/lib/entrez/version.rb
CHANGED
data/spec/entrez_spec.rb
CHANGED
@@ -32,6 +32,11 @@ describe Entrez do
|
|
32
32
|
response.ids.should == [60153, 29429, 28911, 48101, 59851, 59849, 59847, 59845, 59839, 59835, 59833, 59831, 51895, 59829, 59827, 60835, 59811, 60831, 60819, 33895]
|
33
33
|
end
|
34
34
|
|
35
|
+
it 'ESearch returns empty array if nothing found' do
|
36
|
+
response = Entrez.ESearch('genomeprj', {NON_EXISTENT_SEARCH_FIELD: 'does not exist even in oompaloompa land'}, retmode: :xml)
|
37
|
+
response.ids.should be_empty
|
38
|
+
end
|
39
|
+
|
35
40
|
it 'should respect query limit' do
|
36
41
|
requests = proc { 4.times { Entrez.EFetch('taxonomy', id: 9606) } }
|
37
42
|
requests.should take_longer_than(1.0)
|