aylien_news_api 0.0.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 +7 -0
- data/Gemfile +3 -0
- data/Gemfile.lock +67 -0
- data/LICENSE +13 -0
- data/README.md +133 -0
- data/Rakefile +8 -0
- data/aylien_news_api.gemspec +33 -0
- data/docs/Author.md +10 -0
- data/docs/Autocomplete.md +9 -0
- data/docs/Autocompletes.md +8 -0
- data/docs/Category.md +13 -0
- data/docs/CategoryLinks.md +9 -0
- data/docs/Coverages.md +12 -0
- data/docs/DefaultApi.md +829 -0
- data/docs/Entities.md +9 -0
- data/docs/Entity.md +12 -0
- data/docs/EntityLinks.md +8 -0
- data/docs/Error.md +13 -0
- data/docs/ErrorLinks.md +8 -0
- data/docs/Errors.md +8 -0
- data/docs/HistogramInterval.md +9 -0
- data/docs/Histograms.md +12 -0
- data/docs/Location.md +10 -0
- data/docs/Media.md +9 -0
- data/docs/RelatedStories.md +11 -0
- data/docs/Scope.md +11 -0
- data/docs/Sentiment.md +9 -0
- data/docs/Sentiments.md +9 -0
- data/docs/ShareCount.md +9 -0
- data/docs/ShareCounts.md +11 -0
- data/docs/Source.md +13 -0
- data/docs/Stories.md +10 -0
- data/docs/Story.md +27 -0
- data/docs/StoryCluster.md +12 -0
- data/docs/StoryLinks.md +10 -0
- data/docs/Summary.md +8 -0
- data/docs/TimeSeries.md +9 -0
- data/docs/TimeSeriesList.md +11 -0
- data/docs/Trend.md +9 -0
- data/docs/Trends.md +9 -0
- data/lib/aylien_news_api.rb +74 -0
- data/lib/aylien_news_api/api/default_api.rb +1171 -0
- data/lib/aylien_news_api/api_client.rb +365 -0
- data/lib/aylien_news_api/api_error.rb +38 -0
- data/lib/aylien_news_api/configuration.rb +191 -0
- data/lib/aylien_news_api/models/author.rb +192 -0
- data/lib/aylien_news_api/models/autocomplete.rb +183 -0
- data/lib/aylien_news_api/models/autocompletes.rb +176 -0
- data/lib/aylien_news_api/models/category.rb +229 -0
- data/lib/aylien_news_api/models/category_links.rb +183 -0
- data/lib/aylien_news_api/models/coverages.rb +212 -0
- data/lib/aylien_news_api/models/entities.rb +187 -0
- data/lib/aylien_news_api/models/entity.rb +214 -0
- data/lib/aylien_news_api/models/entity_links.rb +174 -0
- data/lib/aylien_news_api/models/error.rb +213 -0
- data/lib/aylien_news_api/models/error_links.rb +173 -0
- data/lib/aylien_news_api/models/errors.rb +175 -0
- data/lib/aylien_news_api/models/histogram_interval.rb +183 -0
- data/lib/aylien_news_api/models/histograms.rb +211 -0
- data/lib/aylien_news_api/models/location.rb +192 -0
- data/lib/aylien_news_api/models/media.rb +193 -0
- data/lib/aylien_news_api/models/related_stories.rb +203 -0
- data/lib/aylien_news_api/models/scope.rb +211 -0
- data/lib/aylien_news_api/models/sentiment.rb +193 -0
- data/lib/aylien_news_api/models/sentiments.rb +183 -0
- data/lib/aylien_news_api/models/share_count.rb +183 -0
- data/lib/aylien_news_api/models/share_counts.rb +209 -0
- data/lib/aylien_news_api/models/source.rb +223 -0
- data/lib/aylien_news_api/models/stories.rb +196 -0
- data/lib/aylien_news_api/models/story.rb +353 -0
- data/lib/aylien_news_api/models/story_cluster.rb +214 -0
- data/lib/aylien_news_api/models/story_links.rb +192 -0
- data/lib/aylien_news_api/models/summary.rb +176 -0
- data/lib/aylien_news_api/models/time_series.rb +183 -0
- data/lib/aylien_news_api/models/time_series_list.rb +203 -0
- data/lib/aylien_news_api/models/trend.rb +183 -0
- data/lib/aylien_news_api/models/trends.rb +185 -0
- data/lib/aylien_news_api/version.rb +17 -0
- data/spec/api/default_api_spec.rb +357 -0
- data/spec/models/author_spec.rb +66 -0
- data/spec/models/autocomplete_spec.rb +56 -0
- data/spec/models/autocompletes_spec.rb +46 -0
- data/spec/models/category_links_spec.rb +56 -0
- data/spec/models/category_spec.rb +96 -0
- data/spec/models/coverages_spec.rb +86 -0
- data/spec/models/entities_spec.rb +56 -0
- data/spec/models/entity_links_spec.rb +46 -0
- data/spec/models/entity_spec.rb +86 -0
- data/spec/models/error_links_spec.rb +46 -0
- data/spec/models/error_spec.rb +96 -0
- data/spec/models/errors_spec.rb +46 -0
- data/spec/models/histogram_interval_spec.rb +56 -0
- data/spec/models/histograms_spec.rb +86 -0
- data/spec/models/location_spec.rb +66 -0
- data/spec/models/media_spec.rb +56 -0
- data/spec/models/related_stories_spec.rb +76 -0
- data/spec/models/scope_spec.rb +76 -0
- data/spec/models/sentiment_spec.rb +56 -0
- data/spec/models/sentiments_spec.rb +56 -0
- data/spec/models/share_count_spec.rb +56 -0
- data/spec/models/share_counts_spec.rb +76 -0
- data/spec/models/source_spec.rb +96 -0
- data/spec/models/stories_spec.rb +66 -0
- data/spec/models/story_cluster_spec.rb +86 -0
- data/spec/models/story_links_spec.rb +66 -0
- data/spec/models/story_spec.rb +236 -0
- data/spec/models/summary_spec.rb +46 -0
- data/spec/models/time_series_list_spec.rb +76 -0
- data/spec/models/time_series_spec.rb +56 -0
- data/spec/models/trend_spec.rb +56 -0
- data/spec/models/trends_spec.rb +56 -0
- metadata +391 -0
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
# Copyright 2016 Aylien, Inc. All Rights Reserved.
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
15
|
+
require 'spec_helper'
|
|
16
|
+
require 'json'
|
|
17
|
+
require 'date'
|
|
18
|
+
|
|
19
|
+
# Unit tests for AylienNewsApi::RelatedStories
|
|
20
|
+
describe 'RelatedStories' do
|
|
21
|
+
before do
|
|
22
|
+
# run before each test
|
|
23
|
+
@instance = AylienNewsApi::RelatedStories.new
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
after do
|
|
27
|
+
# run after each test
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
describe 'test an instance of RelatedStories' do
|
|
31
|
+
it 'should create an instact of RelatedStories' do
|
|
32
|
+
@instance.should be_a(AylienNewsApi::RelatedStories)
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
describe 'test attribute "story_title"' do
|
|
36
|
+
it 'should work' do
|
|
37
|
+
# assertion here
|
|
38
|
+
# should be_a()
|
|
39
|
+
# should be_nil
|
|
40
|
+
# should ==
|
|
41
|
+
# should_not ==
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
describe 'test attribute "story_body"' do
|
|
46
|
+
it 'should work' do
|
|
47
|
+
# assertion here
|
|
48
|
+
# should be_a()
|
|
49
|
+
# should be_nil
|
|
50
|
+
# should ==
|
|
51
|
+
# should_not ==
|
|
52
|
+
end
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
describe 'test attribute "story_language"' do
|
|
56
|
+
it 'should work' do
|
|
57
|
+
# assertion here
|
|
58
|
+
# should be_a()
|
|
59
|
+
# should be_nil
|
|
60
|
+
# should ==
|
|
61
|
+
# should_not ==
|
|
62
|
+
end
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
describe 'test attribute "related_stories"' do
|
|
66
|
+
it 'should work' do
|
|
67
|
+
# assertion here
|
|
68
|
+
# should be_a()
|
|
69
|
+
# should be_nil
|
|
70
|
+
# should ==
|
|
71
|
+
# should_not ==
|
|
72
|
+
end
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
end
|
|
76
|
+
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
# Copyright 2016 Aylien, Inc. All Rights Reserved.
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
15
|
+
require 'spec_helper'
|
|
16
|
+
require 'json'
|
|
17
|
+
require 'date'
|
|
18
|
+
|
|
19
|
+
# Unit tests for AylienNewsApi::Scope
|
|
20
|
+
describe 'Scope' do
|
|
21
|
+
before do
|
|
22
|
+
# run before each test
|
|
23
|
+
@instance = AylienNewsApi::Scope.new
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
after do
|
|
27
|
+
# run after each test
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
describe 'test an instance of Scope' do
|
|
31
|
+
it 'should create an instact of Scope' do
|
|
32
|
+
@instance.should be_a(AylienNewsApi::Scope)
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
describe 'test attribute "country"' do
|
|
36
|
+
it 'should work' do
|
|
37
|
+
# assertion here
|
|
38
|
+
# should be_a()
|
|
39
|
+
# should be_nil
|
|
40
|
+
# should ==
|
|
41
|
+
# should_not ==
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
describe 'test attribute "state"' do
|
|
46
|
+
it 'should work' do
|
|
47
|
+
# assertion here
|
|
48
|
+
# should be_a()
|
|
49
|
+
# should be_nil
|
|
50
|
+
# should ==
|
|
51
|
+
# should_not ==
|
|
52
|
+
end
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
describe 'test attribute "city"' do
|
|
56
|
+
it 'should work' do
|
|
57
|
+
# assertion here
|
|
58
|
+
# should be_a()
|
|
59
|
+
# should be_nil
|
|
60
|
+
# should ==
|
|
61
|
+
# should_not ==
|
|
62
|
+
end
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
describe 'test attribute "level"' do
|
|
66
|
+
it 'should work' do
|
|
67
|
+
# assertion here
|
|
68
|
+
# should be_a()
|
|
69
|
+
# should be_nil
|
|
70
|
+
# should ==
|
|
71
|
+
# should_not ==
|
|
72
|
+
end
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
end
|
|
76
|
+
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# Copyright 2016 Aylien, Inc. All Rights Reserved.
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
15
|
+
require 'spec_helper'
|
|
16
|
+
require 'json'
|
|
17
|
+
require 'date'
|
|
18
|
+
|
|
19
|
+
# Unit tests for AylienNewsApi::Sentiment
|
|
20
|
+
describe 'Sentiment' do
|
|
21
|
+
before do
|
|
22
|
+
# run before each test
|
|
23
|
+
@instance = AylienNewsApi::Sentiment.new
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
after do
|
|
27
|
+
# run after each test
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
describe 'test an instance of Sentiment' do
|
|
31
|
+
it 'should create an instact of Sentiment' do
|
|
32
|
+
@instance.should be_a(AylienNewsApi::Sentiment)
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
describe 'test attribute "polarity"' do
|
|
36
|
+
it 'should work' do
|
|
37
|
+
# assertion here
|
|
38
|
+
# should be_a()
|
|
39
|
+
# should be_nil
|
|
40
|
+
# should ==
|
|
41
|
+
# should_not ==
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
describe 'test attribute "score"' do
|
|
46
|
+
it 'should work' do
|
|
47
|
+
# assertion here
|
|
48
|
+
# should be_a()
|
|
49
|
+
# should be_nil
|
|
50
|
+
# should ==
|
|
51
|
+
# should_not ==
|
|
52
|
+
end
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
end
|
|
56
|
+
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# Copyright 2016 Aylien, Inc. All Rights Reserved.
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
15
|
+
require 'spec_helper'
|
|
16
|
+
require 'json'
|
|
17
|
+
require 'date'
|
|
18
|
+
|
|
19
|
+
# Unit tests for AylienNewsApi::Sentiments
|
|
20
|
+
describe 'Sentiments' do
|
|
21
|
+
before do
|
|
22
|
+
# run before each test
|
|
23
|
+
@instance = AylienNewsApi::Sentiments.new
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
after do
|
|
27
|
+
# run after each test
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
describe 'test an instance of Sentiments' do
|
|
31
|
+
it 'should create an instact of Sentiments' do
|
|
32
|
+
@instance.should be_a(AylienNewsApi::Sentiments)
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
describe 'test attribute "title"' do
|
|
36
|
+
it 'should work' do
|
|
37
|
+
# assertion here
|
|
38
|
+
# should be_a()
|
|
39
|
+
# should be_nil
|
|
40
|
+
# should ==
|
|
41
|
+
# should_not ==
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
describe 'test attribute "body"' do
|
|
46
|
+
it 'should work' do
|
|
47
|
+
# assertion here
|
|
48
|
+
# should be_a()
|
|
49
|
+
# should be_nil
|
|
50
|
+
# should ==
|
|
51
|
+
# should_not ==
|
|
52
|
+
end
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
end
|
|
56
|
+
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# Copyright 2016 Aylien, Inc. All Rights Reserved.
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
15
|
+
require 'spec_helper'
|
|
16
|
+
require 'json'
|
|
17
|
+
require 'date'
|
|
18
|
+
|
|
19
|
+
# Unit tests for AylienNewsApi::ShareCount
|
|
20
|
+
describe 'ShareCount' do
|
|
21
|
+
before do
|
|
22
|
+
# run before each test
|
|
23
|
+
@instance = AylienNewsApi::ShareCount.new
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
after do
|
|
27
|
+
# run after each test
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
describe 'test an instance of ShareCount' do
|
|
31
|
+
it 'should create an instact of ShareCount' do
|
|
32
|
+
@instance.should be_a(AylienNewsApi::ShareCount)
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
describe 'test attribute "count"' do
|
|
36
|
+
it 'should work' do
|
|
37
|
+
# assertion here
|
|
38
|
+
# should be_a()
|
|
39
|
+
# should be_nil
|
|
40
|
+
# should ==
|
|
41
|
+
# should_not ==
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
describe 'test attribute "fetched_at"' do
|
|
46
|
+
it 'should work' do
|
|
47
|
+
# assertion here
|
|
48
|
+
# should be_a()
|
|
49
|
+
# should be_nil
|
|
50
|
+
# should ==
|
|
51
|
+
# should_not ==
|
|
52
|
+
end
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
end
|
|
56
|
+
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
# Copyright 2016 Aylien, Inc. All Rights Reserved.
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
15
|
+
require 'spec_helper'
|
|
16
|
+
require 'json'
|
|
17
|
+
require 'date'
|
|
18
|
+
|
|
19
|
+
# Unit tests for AylienNewsApi::ShareCounts
|
|
20
|
+
describe 'ShareCounts' do
|
|
21
|
+
before do
|
|
22
|
+
# run before each test
|
|
23
|
+
@instance = AylienNewsApi::ShareCounts.new
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
after do
|
|
27
|
+
# run after each test
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
describe 'test an instance of ShareCounts' do
|
|
31
|
+
it 'should create an instact of ShareCounts' do
|
|
32
|
+
@instance.should be_a(AylienNewsApi::ShareCounts)
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
describe 'test attribute "facebook"' do
|
|
36
|
+
it 'should work' do
|
|
37
|
+
# assertion here
|
|
38
|
+
# should be_a()
|
|
39
|
+
# should be_nil
|
|
40
|
+
# should ==
|
|
41
|
+
# should_not ==
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
describe 'test attribute "google_plus"' do
|
|
46
|
+
it 'should work' do
|
|
47
|
+
# assertion here
|
|
48
|
+
# should be_a()
|
|
49
|
+
# should be_nil
|
|
50
|
+
# should ==
|
|
51
|
+
# should_not ==
|
|
52
|
+
end
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
describe 'test attribute "linkedin"' do
|
|
56
|
+
it 'should work' do
|
|
57
|
+
# assertion here
|
|
58
|
+
# should be_a()
|
|
59
|
+
# should be_nil
|
|
60
|
+
# should ==
|
|
61
|
+
# should_not ==
|
|
62
|
+
end
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
describe 'test attribute "reddit"' do
|
|
66
|
+
it 'should work' do
|
|
67
|
+
# assertion here
|
|
68
|
+
# should be_a()
|
|
69
|
+
# should be_nil
|
|
70
|
+
# should ==
|
|
71
|
+
# should_not ==
|
|
72
|
+
end
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
end
|
|
76
|
+
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
# Copyright 2016 Aylien, Inc. All Rights Reserved.
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
15
|
+
require 'spec_helper'
|
|
16
|
+
require 'json'
|
|
17
|
+
require 'date'
|
|
18
|
+
|
|
19
|
+
# Unit tests for AylienNewsApi::Source
|
|
20
|
+
describe 'Source' do
|
|
21
|
+
before do
|
|
22
|
+
# run before each test
|
|
23
|
+
@instance = AylienNewsApi::Source.new
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
after do
|
|
27
|
+
# run after each test
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
describe 'test an instance of Source' do
|
|
31
|
+
it 'should create an instact of Source' do
|
|
32
|
+
@instance.should be_a(AylienNewsApi::Source)
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
describe 'test attribute "id"' do
|
|
36
|
+
it 'should work' do
|
|
37
|
+
# assertion here
|
|
38
|
+
# should be_a()
|
|
39
|
+
# should be_nil
|
|
40
|
+
# should ==
|
|
41
|
+
# should_not ==
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
describe 'test attribute "name"' do
|
|
46
|
+
it 'should work' do
|
|
47
|
+
# assertion here
|
|
48
|
+
# should be_a()
|
|
49
|
+
# should be_nil
|
|
50
|
+
# should ==
|
|
51
|
+
# should_not ==
|
|
52
|
+
end
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
describe 'test attribute "domain"' do
|
|
56
|
+
it 'should work' do
|
|
57
|
+
# assertion here
|
|
58
|
+
# should be_a()
|
|
59
|
+
# should be_nil
|
|
60
|
+
# should ==
|
|
61
|
+
# should_not ==
|
|
62
|
+
end
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
describe 'test attribute "logo_url"' do
|
|
66
|
+
it 'should work' do
|
|
67
|
+
# assertion here
|
|
68
|
+
# should be_a()
|
|
69
|
+
# should be_nil
|
|
70
|
+
# should ==
|
|
71
|
+
# should_not ==
|
|
72
|
+
end
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
describe 'test attribute "locations"' do
|
|
76
|
+
it 'should work' do
|
|
77
|
+
# assertion here
|
|
78
|
+
# should be_a()
|
|
79
|
+
# should be_nil
|
|
80
|
+
# should ==
|
|
81
|
+
# should_not ==
|
|
82
|
+
end
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
describe 'test attribute "scopes"' do
|
|
86
|
+
it 'should work' do
|
|
87
|
+
# assertion here
|
|
88
|
+
# should be_a()
|
|
89
|
+
# should be_nil
|
|
90
|
+
# should ==
|
|
91
|
+
# should_not ==
|
|
92
|
+
end
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
end
|
|
96
|
+
|