ultron 0.1.7 → 0.1.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ultron/models/entities.rb +8 -0
- data/lib/ultron/version.rb +1 -1
- data/spec/cassettes/searching/pre-baked_searches/should_give_us_just_regular_comics.yml +928 -0
- data/spec/cassettes/searching/pre-baked_searches/should_give_us_regular_comics_filtered_by_character.yml +2150 -0
- data/spec/ultron/searches/sample_spec.rb +4 -0
- data/spec/ultron/searches/searches_spec.rb +22 -0
- metadata +5 -1
@@ -29,6 +29,10 @@ module Ultron
|
|
29
29
|
set.stub(:random_offset).and_return(100)
|
30
30
|
set.sample.title.should == 'Dazzler (1981) #19'
|
31
31
|
end
|
32
|
+
|
33
|
+
it 'should support sample as a class method', :vcr do
|
34
|
+
pending 'I have no idea how to test this. Works, though'
|
35
|
+
end
|
32
36
|
end
|
33
37
|
|
34
38
|
after :each do
|
@@ -41,6 +41,28 @@ module Ultron
|
|
41
41
|
comics.count.should == 50
|
42
42
|
end
|
43
43
|
|
44
|
+
context 'pre-baked searches' do
|
45
|
+
it 'should give us just regular comics', :vcr do
|
46
|
+
comics = Comics.vanilla_comics
|
47
|
+
comics.first.id.should == 49241
|
48
|
+
comics.first.title.should == 'Wolverine (2014) #5'
|
49
|
+
comics.first.issueNumber.should == 5
|
50
|
+
end
|
51
|
+
|
52
|
+
it 'should give us regular comics filtered by character', :vcr do
|
53
|
+
comics = Comics.by_character_and_vanilla_comics 1009685
|
54
|
+
comics.first.title.should == 'AGE OF ULTRON (2013) #1'
|
55
|
+
end
|
56
|
+
|
57
|
+
it 'should barf on an unknown search', :vcr do
|
58
|
+
begin
|
59
|
+
comics = Comics.fake_search
|
60
|
+
rescue Exception => e
|
61
|
+
e.class.should == NoMethodError
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
65
|
+
|
44
66
|
after :each do
|
45
67
|
Timecop.return
|
46
68
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ultron
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- pikesley
|
@@ -296,6 +296,8 @@ files:
|
|
296
296
|
- spec/cassettes/sample/let_us_pick_a_random_item/should_give_us_a_random_comic.yml
|
297
297
|
- spec/cassettes/sample/let_us_pick_a_random_item/should_give_us_a_random_comic_for_a_more_complex_search.yml
|
298
298
|
- spec/cassettes/sample/let_us_pick_a_random_item/should_give_us_a_random_offset_into_the_result_set.yml
|
299
|
+
- spec/cassettes/searching/pre-baked_searches/should_give_us_just_regular_comics.yml
|
300
|
+
- spec/cassettes/searching/pre-baked_searches/should_give_us_regular_comics_filtered_by_character.yml
|
299
301
|
- spec/cassettes/searching/should_accept_with_as_a_synonym_for_where.yml
|
300
302
|
- spec/cassettes/searching/should_let_us_get_a_comic.yml
|
301
303
|
- spec/cassettes/searching/should_let_us_get_comics_by_a_creator.yml
|
@@ -360,6 +362,8 @@ test_files:
|
|
360
362
|
- spec/cassettes/sample/let_us_pick_a_random_item/should_give_us_a_random_comic.yml
|
361
363
|
- spec/cassettes/sample/let_us_pick_a_random_item/should_give_us_a_random_comic_for_a_more_complex_search.yml
|
362
364
|
- spec/cassettes/sample/let_us_pick_a_random_item/should_give_us_a_random_offset_into_the_result_set.yml
|
365
|
+
- spec/cassettes/searching/pre-baked_searches/should_give_us_just_regular_comics.yml
|
366
|
+
- spec/cassettes/searching/pre-baked_searches/should_give_us_regular_comics_filtered_by_character.yml
|
363
367
|
- spec/cassettes/searching/should_accept_with_as_a_synonym_for_where.yml
|
364
368
|
- spec/cassettes/searching/should_let_us_get_a_comic.yml
|
365
369
|
- spec/cassettes/searching/should_let_us_get_comics_by_a_creator.yml
|