thetvdb_api 0.2.1 → 0.2.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.
Files changed (80) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +1 -1
  3. data/README.md +36 -81
  4. data/lib/thetvdb_api/actor.rb +15 -1
  5. data/lib/thetvdb_api/banner.rb +15 -1
  6. data/lib/thetvdb_api/base.rb +4 -4
  7. data/lib/thetvdb_api/episode.rb +50 -5
  8. data/lib/thetvdb_api/response/actors.rb +7 -0
  9. data/lib/thetvdb_api/response/banners.rb +7 -0
  10. data/lib/thetvdb_api/response/collection.rb +9 -0
  11. data/lib/thetvdb_api/response/episode.rb +5 -0
  12. data/lib/thetvdb_api/response/full_series.rb +21 -0
  13. data/lib/thetvdb_api/response/search_multiple_episode.rb +7 -0
  14. data/lib/thetvdb_api/response/search_multiple_series.rb +7 -0
  15. data/lib/thetvdb_api/response/search_series.rb +5 -0
  16. data/lib/thetvdb_api/response/series.rb +5 -0
  17. data/lib/thetvdb_api/response/update.rb +31 -0
  18. data/lib/thetvdb_api/response.rb +30 -8
  19. data/lib/thetvdb_api/search.rb +50 -4
  20. data/lib/thetvdb_api/series.rb +28 -2
  21. data/lib/thetvdb_api/update.rb +24 -8
  22. data/lib/thetvdb_api/version.rb +1 -1
  23. data/lib/thetvdb_api.rb +11 -1
  24. data/spec/integrations/actor_spec.rb +1 -1
  25. data/spec/integrations/banner_spec.rb +1 -1
  26. data/spec/integrations/client_spec.rb +15 -15
  27. data/spec/integrations/episode_spec.rb +4 -4
  28. data/spec/integrations/search_spec.rb +4 -4
  29. data/spec/integrations/series_spec.rb +2 -2
  30. data/spec/integrations/update_spec.rb +4 -4
  31. data/spec/spec_helper.rb +0 -21
  32. data/spec/units/actor_spec.rb +49 -0
  33. data/spec/units/banner_spec.rb +49 -0
  34. data/spec/units/episode_spec.rb +167 -0
  35. data/spec/units/response/actors_spec.rb +15 -0
  36. data/spec/units/response/banners_spec.rb +15 -0
  37. data/spec/units/response/collection_spec.rb +38 -0
  38. data/spec/units/response/episode_spec.rb +15 -0
  39. data/spec/units/response/full_series_spec.rb +51 -0
  40. data/spec/units/response/search_multiple_episode_spec.rb +15 -0
  41. data/spec/units/response/search_multiple_series_spec.rb +15 -0
  42. data/spec/units/response/search_series_spec.rb +15 -0
  43. data/spec/units/response/series_spec.rb +15 -0
  44. data/spec/units/response/update_spec.rb +79 -0
  45. data/spec/units/response_spec.rb +100 -0
  46. data/spec/units/search_spec.rb +178 -0
  47. data/spec/units/series_spec.rb +92 -0
  48. data/spec/units/update_spec.rb +178 -0
  49. data/thetvdb_api.gemspec +1 -1
  50. metadata +53 -49
  51. data/lib/thetvdb_api/mappers/actor.rb +0 -17
  52. data/lib/thetvdb_api/mappers/actors.rb +0 -10
  53. data/lib/thetvdb_api/mappers/banner.rb +0 -32
  54. data/lib/thetvdb_api/mappers/banners.rb +0 -10
  55. data/lib/thetvdb_api/mappers/base_mapper.rb +0 -13
  56. data/lib/thetvdb_api/mappers/episode.rb +0 -35
  57. data/lib/thetvdb_api/mappers/full_series.rb +0 -12
  58. data/lib/thetvdb_api/mappers/search_episode.rb +0 -10
  59. data/lib/thetvdb_api/mappers/search_series/series.rb +0 -25
  60. data/lib/thetvdb_api/mappers/search_series.rb +0 -10
  61. data/lib/thetvdb_api/mappers/series.rb +0 -40
  62. data/lib/thetvdb_api/mappers/update/banner.rb +0 -19
  63. data/lib/thetvdb_api/mappers/update/element.rb +0 -10
  64. data/lib/thetvdb_api/mappers/update/episode.rb +0 -8
  65. data/lib/thetvdb_api/mappers/update/series.rb +0 -8
  66. data/lib/thetvdb_api/mappers/update.rb +0 -14
  67. data/spec/thetvdb_api/actor_spec.rb +0 -21
  68. data/spec/thetvdb_api/banner_spec.rb +0 -21
  69. data/spec/thetvdb_api/episode_spec.rb +0 -63
  70. data/spec/thetvdb_api/mappers/actor_spec.rb +0 -15
  71. data/spec/thetvdb_api/mappers/banner_spec.rb +0 -31
  72. data/spec/thetvdb_api/mappers/search_series/series_spec.rb +0 -15
  73. data/spec/thetvdb_api/mappers/series_spec.rb +0 -31
  74. data/spec/thetvdb_api/mappers/update/banner_spec.rb +0 -15
  75. data/spec/thetvdb_api/response_spec.rb +0 -60
  76. data/spec/thetvdb_api/search_spec.rb +0 -63
  77. data/spec/thetvdb_api/series_spec.rb +0 -35
  78. data/spec/thetvdb_api/update_spec.rb +0 -63
  79. /data/spec/{thetvdb_api → units}/base_spec.rb +0 -0
  80. /data/spec/{thetvdb_api → units}/client_spec.rb +0 -0
@@ -0,0 +1,51 @@
1
+ require 'spec_helper'
2
+
3
+ describe ThetvdbApi::Response::FullSeries do
4
+ let(:klass) { ThetvdbApi::Response::FullSeries }
5
+ let(:model) { klass.new(faraday_response) }
6
+ let(:faraday_response) { double(env: true, status: true, headers: true, body: 'TEST') }
7
+
8
+ describe '.parse' do
9
+ before do
10
+ model.stub(:xml_parse).and_return({ 'Data' => { 'Series' => [], 'Episode' => [] } })
11
+ end
12
+
13
+ it 'should call xml_parse' do
14
+ model.should_receive(:xml_parse)
15
+
16
+ model.parse
17
+ end
18
+
19
+ it 'should call episode_normalize' do
20
+ model.should_receive(:episode_normalize)
21
+
22
+ model.parse
23
+ end
24
+ end
25
+
26
+ describe '.xml_parse' do
27
+ it 'should return correct data' do
28
+ model.stub(:multi_xml_parse).and_return({ 'Data' => 'FULL SERIES DATA' })
29
+
30
+ model.xml_parse.should == 'FULL SERIES DATA'
31
+ end
32
+ end
33
+
34
+ describe '.episode_normalize' do
35
+ it 'should call normalize with Episode argument' do
36
+ model.should_receive(:normalize).with('Episode')
37
+
38
+ model.episode_normalize
39
+ end
40
+ end
41
+
42
+ describe '.normalize' do
43
+ it 'should convert hash to array' do
44
+ model.instance_variable_set('@parse', { 'Episode' => {} })
45
+
46
+ model.normalize('Episode')
47
+
48
+ model.parse['Episode'].should == [{}]
49
+ end
50
+ end
51
+ end
@@ -0,0 +1,15 @@
1
+ require 'spec_helper'
2
+
3
+ describe ThetvdbApi::Response::SearchMultipleEpisode do
4
+ let(:klass) { ThetvdbApi::Response::SearchMultipleEpisode }
5
+ let(:model) { klass.new(faraday_response) }
6
+ let(:faraday_response) { double(env: true, status: true, headers: true, body: 'TEST') }
7
+
8
+ describe '.xml_parse' do
9
+ it 'should return correct data' do
10
+ model.stub(:multi_xml_parse).and_return({ 'Data' => { 'Episode' => 'EPISODE DATA' } })
11
+
12
+ model.xml_parse.should == 'EPISODE DATA'
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,15 @@
1
+ require 'spec_helper'
2
+
3
+ describe ThetvdbApi::Response::SearchMultipleSeries do
4
+ let(:klass) { ThetvdbApi::Response::SearchMultipleSeries }
5
+ let(:model) { klass.new(faraday_response) }
6
+ let(:faraday_response) { double(env: true, status: true, headers: true, body: 'TEST') }
7
+
8
+ describe '.xml_parse' do
9
+ it 'should return correct data' do
10
+ model.stub(:multi_xml_parse).and_return({ 'Data' => { 'Series' => 'SERIES DATA' } })
11
+
12
+ model.xml_parse.should == 'SERIES DATA'
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,15 @@
1
+ require 'spec_helper'
2
+
3
+ describe ThetvdbApi::Response::SearchSeries do
4
+ let(:klass) { ThetvdbApi::Response::SearchSeries }
5
+ let(:model) { klass.new(faraday_response) }
6
+ let(:faraday_response) { double(env: true, status: true, headers: true, body: 'TEST') }
7
+
8
+ describe '.xml_parse' do
9
+ it 'should return correct data' do
10
+ model.stub(:multi_xml_parse).and_return({ 'Data' => { 'Series' => 'SERIES DATA' } })
11
+
12
+ model.xml_parse.should == 'SERIES DATA'
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,15 @@
1
+ require 'spec_helper'
2
+
3
+ describe ThetvdbApi::Response::Series do
4
+ let(:klass) { ThetvdbApi::Response::Series }
5
+ let(:model) { klass.new(faraday_response) }
6
+ let(:faraday_response) { double(env: true, status: true, headers: true, body: 'TEST') }
7
+
8
+ describe '.xml_parse' do
9
+ it 'should return correct data' do
10
+ model.stub(:multi_xml_parse).and_return({ 'Series' => 'SERIES DATA' })
11
+
12
+ model.xml_parse.should == 'SERIES DATA'
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,79 @@
1
+ require 'spec_helper'
2
+
3
+ describe ThetvdbApi::Response::Update do
4
+ let(:klass) { ThetvdbApi::Response::Update }
5
+ let(:model) { klass.new(faraday_response) }
6
+ let(:faraday_response) { double(env: true, status: true, headers: true, body: 'TEST') }
7
+
8
+ describe '.parse' do
9
+ before do
10
+ model.stub(:xml_parse).and_return({ 'Data' => { 'Series' => [], 'Episode' => [], 'Banner' => [] } })
11
+ end
12
+
13
+ it 'should call xml_parse' do
14
+ model.should_receive(:xml_parse)
15
+
16
+ model.parse
17
+ end
18
+
19
+ it 'should call series_normalize' do
20
+ model.should_receive(:series_normalize)
21
+
22
+ model.parse
23
+ end
24
+
25
+ it 'should call episode_normalize' do
26
+ model.should_receive(:episode_normalize)
27
+
28
+ model.parse
29
+ end
30
+
31
+ it 'should call banner_normalize' do
32
+ model.should_receive(:banner_normalize)
33
+
34
+ model.parse
35
+ end
36
+ end
37
+
38
+ describe '.xml_parse' do
39
+ it 'should return correct data' do
40
+ model.stub(:multi_xml_parse).and_return({ 'Data' => 'UPDATE DATA' })
41
+
42
+ model.xml_parse.should == 'UPDATE DATA'
43
+ end
44
+ end
45
+
46
+ describe '.series_normalize' do
47
+ it 'should call normalize with Series argument' do
48
+ model.should_receive(:normalize).with('Series')
49
+
50
+ model.series_normalize
51
+ end
52
+ end
53
+
54
+ describe '.episode_normalize' do
55
+ it 'should call normalize with Episode argument' do
56
+ model.should_receive(:normalize).with('Episode')
57
+
58
+ model.episode_normalize
59
+ end
60
+ end
61
+
62
+ describe '.banner_normalize' do
63
+ it 'should call normalize with Banner argument' do
64
+ model.should_receive(:normalize).with('Banner')
65
+
66
+ model.banner_normalize
67
+ end
68
+ end
69
+
70
+ describe '.normalize' do
71
+ it 'should convert hash to array' do
72
+ model.instance_variable_set('@parse', { 'Series' => {} })
73
+
74
+ model.normalize('Series')
75
+
76
+ model.parse['Series'].should == [{}]
77
+ end
78
+ end
79
+ end
@@ -0,0 +1,100 @@
1
+ require 'spec_helper'
2
+
3
+ describe ThetvdbApi::Search do
4
+ let(:klass) { ThetvdbApi::Response }
5
+ let(:model) { klass.new(faraday_response) }
6
+ let(:faraday_response) { double(env: true, status: true, headers: true, body: 'TEST') }
7
+
8
+ describe '.env' do
9
+ it 'should call env in faraday_response' do
10
+ faraday_response.should_receive(:env)
11
+
12
+ model.env
13
+ end
14
+ end
15
+
16
+ describe '.status' do
17
+ it 'should call status in faraday_response' do
18
+ faraday_response.should_receive(:status)
19
+
20
+ model.status
21
+ end
22
+ end
23
+
24
+ describe '.headers' do
25
+ it 'should call headers in faraday_response' do
26
+ faraday_response.should_receive(:headers)
27
+
28
+ model.headers
29
+ end
30
+ end
31
+
32
+ describe '.body' do
33
+ it 'should map response when give mapper' do
34
+ model = klass.new(faraday_response, true)
35
+ model.should_receive(:parse)
36
+
37
+ model.body
38
+ end
39
+
40
+ it 'should return string' do
41
+ model.body.class.should == String
42
+ end
43
+ end
44
+
45
+ describe '.inspect' do
46
+ it 'should return correct string' do
47
+ model.stub(:body).and_return('BODY')
48
+ model.inspect.should == '"BODY"'
49
+ end
50
+ end
51
+
52
+ describe '[]' do
53
+ it 'should return correct string' do
54
+ model.stub(:parse).and_return({'test' => 'output'})
55
+ model['test'].should == 'output'
56
+ end
57
+ end
58
+
59
+ describe '[]=' do
60
+ it 'should return correct string' do
61
+ model.stub(:parse).and_return({'test' => 'output'})
62
+ model['test'] = 'output2'
63
+
64
+ model['test'].should == 'output2'
65
+ end
66
+ end
67
+
68
+ describe '.each' do
69
+ it 'should call each on parsed value' do
70
+ model.stub(:parse).and_return([])
71
+ model.parse.should_receive(:each)
72
+
73
+ model.each {}
74
+ end
75
+ end
76
+
77
+ describe '.multi_xml_parse' do
78
+ it 'should call parse on MultiXml' do
79
+ MultiXml.should_receive(:parse)
80
+
81
+ model.multi_xml_parse
82
+ end
83
+ end
84
+
85
+ describe '.xml_parse' do
86
+ it 'should call parse on MultiXml' do
87
+ model.should_receive(:multi_xml_parse)
88
+
89
+ model.xml_parse
90
+ end
91
+ end
92
+
93
+ describe '.parse' do
94
+ it 'should call multi_xml_parse' do
95
+ model.should_receive(:multi_xml_parse)
96
+
97
+ model.parse
98
+ end
99
+ end
100
+ end
@@ -0,0 +1,178 @@
1
+ require 'spec_helper'
2
+
3
+ describe ThetvdbApi::Search do
4
+ let(:klass) { ThetvdbApi::Search }
5
+ let(:model) { klass.new(ThetvdbApi::Client.new(api_key: '123456789')) }
6
+
7
+ describe '.get_series' do
8
+ it 'should call find_get_with_params with specific arguments' do
9
+ model.should_receive(:get_series_get_with_params).with('buffy', {}).and_return(double(response: true))
10
+
11
+ model.get_series('buffy')
12
+ end
13
+
14
+ it 'should call response with specific arguments' do
15
+ model.should_receive(:response).with(ThetvdbApi::Response::SearchMultipleSeries)
16
+
17
+ model.get_series('buffy')
18
+ end
19
+ end
20
+
21
+ describe '.get_series_url' do
22
+ it 'should call find_get_with_params with specific arguments' do
23
+ model.should_receive(:get_series_get_with_params).with('buffy', {}).and_return(double(url: true))
24
+
25
+ model.get_series_url('buffy')
26
+ end
27
+
28
+ it 'should call url' do
29
+ model.should_receive(:url)
30
+
31
+ model.get_series_url('buffy')
32
+ end
33
+ end
34
+
35
+ describe '.get_series_get_with_params' do
36
+ it 'should call get with specific arguments' do
37
+ model.stub(:get_series_path).and_return('PATH')
38
+ model.should_receive(:get).with('PATH').and_return(double(params: true))
39
+
40
+ model.get_series_get_with_params('buffy', {})
41
+ end
42
+
43
+ it 'should call params with specific arguments' do
44
+ model.should_receive(:params).with(seriesname: 'buffy')
45
+
46
+ model.get_series_get_with_params('buffy', {})
47
+ end
48
+ end
49
+
50
+ describe '.get_series_by_imdb_id' do
51
+ it 'should call find_get_with_params with specific arguments' do
52
+ model.should_receive(:get_series_by_imdb_id_get_with_params).with('1234', {}).and_return(double(response: true))
53
+
54
+ model.get_series_by_imdb_id('1234')
55
+ end
56
+
57
+ it 'should call response with specific arguments' do
58
+ model.should_receive(:response).with(ThetvdbApi::Response::SearchSeries)
59
+
60
+ model.get_series_by_imdb_id('1234')
61
+ end
62
+ end
63
+
64
+ describe '.get_series_by_imdb_id_url' do
65
+ it 'should call find_get_with_params with specific arguments' do
66
+ model.should_receive(:get_series_by_imdb_id_get_with_params).with('1234', {}).and_return(double(url: true))
67
+
68
+ model.get_series_by_imdb_id_url('1234')
69
+ end
70
+
71
+ it 'should call url' do
72
+ model.should_receive(:url)
73
+
74
+ model.get_series_by_imdb_id_url('1234')
75
+ end
76
+ end
77
+
78
+ describe '.get_series_by_imdb_id_get_with_params' do
79
+ it 'should call get with specific arguments' do
80
+ model.stub(:get_series_by_remote_id_path).and_return('PATH')
81
+ model.should_receive(:get).with('PATH').and_return(double(params: true))
82
+
83
+ model.get_series_by_imdb_id_get_with_params('1234', {})
84
+ end
85
+
86
+ it 'should call params with specific arguments' do
87
+ model.should_receive(:params).with(imdbid: '1234')
88
+
89
+ model.get_series_by_imdb_id_get_with_params('1234', {})
90
+ end
91
+ end
92
+
93
+ describe '.get_series_by_zap2it_id' do
94
+ it 'should call find_get_with_params with specific arguments' do
95
+ model.should_receive(:get_series_by_zap2it_id_get_with_params).with('1234', {}).and_return(double(response: true))
96
+
97
+ model.get_series_by_zap2it_id('1234')
98
+ end
99
+
100
+ it 'should call response with specific arguments' do
101
+ model.should_receive(:response).with(ThetvdbApi::Response::SearchSeries)
102
+
103
+ model.get_series_by_zap2it_id('1234')
104
+ end
105
+ end
106
+
107
+ describe '.get_series_by_zap2it_id_url' do
108
+ it 'should call find_get_with_params with specific arguments' do
109
+ model.should_receive(:get_series_by_zap2it_id_get_with_params).with('1234', {}).and_return(double(url: true))
110
+
111
+ model.get_series_by_zap2it_id_url('1234')
112
+ end
113
+
114
+ it 'should call url' do
115
+ model.should_receive(:url)
116
+
117
+ model.get_series_by_zap2it_id_url('1234')
118
+ end
119
+ end
120
+
121
+ describe '.get_series_by_imdb_id_get_with_params' do
122
+ it 'should call get with specific arguments' do
123
+ model.stub(:get_series_by_remote_id_path).and_return('PATH')
124
+ model.should_receive(:get).with('PATH').and_return(double(params: true))
125
+
126
+ model.get_series_by_zap2it_id_get_with_params('1234', {})
127
+ end
128
+
129
+ it 'should call params with specific arguments' do
130
+ model.should_receive(:params).with(zap2it: '1234')
131
+
132
+ model.get_series_by_zap2it_id_get_with_params('1234', {})
133
+ end
134
+ end
135
+
136
+ describe '.get_episode' do
137
+ it 'should call find_get_with_params with specific arguments' do
138
+ model.should_receive(:get_episode_get_with_params).with('1234', '2000-01-01', {}).and_return(double(response: true))
139
+
140
+ model.get_episode('1234', '2000-01-01')
141
+ end
142
+
143
+ it 'should call response with specific arguments' do
144
+ model.should_receive(:response).with(ThetvdbApi::Response::SearchMultipleEpisode)
145
+
146
+ model.get_episode('1234', '2000-01-01')
147
+ end
148
+ end
149
+
150
+ describe '.get_episode_url' do
151
+ it 'should call find_get_with_params with specific arguments' do
152
+ model.should_receive(:get_episode_get_with_params).with('1234', '2000-01-01', {}).and_return(double(url: true))
153
+
154
+ model.get_episode_url('1234', '2000-01-01')
155
+ end
156
+
157
+ it 'should call url' do
158
+ model.should_receive(:url)
159
+
160
+ model.get_episode_url('1234', '2000-01-01')
161
+ end
162
+ end
163
+
164
+ describe '.get_episode_get_with_params' do
165
+ it 'should call get with specific arguments' do
166
+ model.stub(:get_episode_path).and_return('PATH')
167
+ model.should_receive(:get).with('PATH').and_return(double(params: true))
168
+
169
+ model.get_episode_get_with_params('1234', '2000-01-01', {})
170
+ end
171
+
172
+ it 'should call params with specific arguments' do
173
+ model.should_receive(:params).with(seriesid: '1234', airdate: '2000-01-01')
174
+
175
+ model.get_episode_get_with_params('1234', '2000-01-01', {})
176
+ end
177
+ end
178
+ end
@@ -0,0 +1,92 @@
1
+ require 'spec_helper'
2
+
3
+ describe ThetvdbApi::Series do
4
+ let(:klass) { ThetvdbApi::Series }
5
+ let(:model) { klass.new(ThetvdbApi::Client.new(api_key: '123456789')) }
6
+
7
+ describe '.find' do
8
+ it 'should call find_get_with_params with specific arguments' do
9
+ model.should_receive(:find_get_with_params).with('1234', {}).and_return(double(response: true))
10
+
11
+ model.find('1234')
12
+ end
13
+
14
+ it 'should call response with specific arguments' do
15
+ model.should_receive(:response).with(ThetvdbApi::Response::Series)
16
+
17
+ model.find('1234')
18
+ end
19
+ end
20
+
21
+ describe '.find_url' do
22
+ it 'should call find_get_with_params with specific arguments' do
23
+ model.should_receive(:find_get_with_params).with('1234', {}).and_return(double(url: true))
24
+
25
+ model.find_url('1234')
26
+ end
27
+
28
+ it 'should call url' do
29
+ model.should_receive(:url)
30
+
31
+ model.find_url('1234')
32
+ end
33
+ end
34
+
35
+ describe '.find_get_with_params' do
36
+ it 'should call get with specific arguments' do
37
+ model.stub(:find_path).and_return('PATH')
38
+ model.should_receive(:get).with('PATH').and_return(double(params: true))
39
+
40
+ model.find_get_with_params('1234', {})
41
+ end
42
+
43
+ it 'should call params with specific arguments' do
44
+ model.should_receive(:params).with(series_id: '1234')
45
+
46
+ model.find_get_with_params('1234', {})
47
+ end
48
+ end
49
+
50
+ describe '.find_full' do
51
+ it 'should call find_get_with_params with specific arguments' do
52
+ model.should_receive(:find_full_get_with_params).with('1234', {}).and_return(double(response: true))
53
+
54
+ model.find_full('1234')
55
+ end
56
+
57
+ it 'should call response with specific arguments' do
58
+ model.should_receive(:response).with(ThetvdbApi::Response::FullSeries)
59
+
60
+ model.find_full('1234')
61
+ end
62
+ end
63
+
64
+ describe '.find_full_url' do
65
+ it 'should call find_get_with_params with specific arguments' do
66
+ model.should_receive(:find_full_get_with_params).with('1234', {}).and_return(double(url: true))
67
+
68
+ model.find_full_url('1234')
69
+ end
70
+
71
+ it 'should call url' do
72
+ model.should_receive(:url)
73
+
74
+ model.find_full_url('1234')
75
+ end
76
+ end
77
+
78
+ describe '.find_full_get_with_params' do
79
+ it 'should call get with specific arguments' do
80
+ model.stub(:find_full_path).and_return('PATH')
81
+ model.should_receive(:get).with('PATH').and_return(double(params: true))
82
+
83
+ model.find_full_get_with_params('1234', {})
84
+ end
85
+
86
+ it 'should call params with specific arguments' do
87
+ model.should_receive(:params).with(series_id: '1234')
88
+
89
+ model.find_full_get_with_params('1234', {})
90
+ end
91
+ end
92
+ end