nicoquery 0.1.7 → 0.1.8

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,8 +1,13 @@
1
1
  require "nicoquery/object/tag_search"
2
+ require "fixture/tag_search_yukkuri_page1"
2
3
 
3
4
 
4
5
  describe "NicoQuery::Object::TagSearch" do
5
6
  before do
7
+ WebMock.stub_request(:get, "http://www.nicovideo.jp/tag/%E3%82%86%E3%81%A3%E3%81%8F%E3%82%8A%E5%AE%9F%E6%B3%81%E3%83%97%E3%83%AC%E3%82%A4?numbers=1&order=a&page=1&rss=2.0&sort=f").
8
+ with(:headers => {'Accept'=>'*/*; q=0.5, application/xml', 'Accept-Encoding'=>'gzip, deflate', 'User-Agent'=>'Ruby'}).
9
+ to_return(:status => 200, :body => Fixture.tag_search_yukkuri_page1, :headers => {})
10
+
6
11
  @tag_search_result = NicoQuery::Object::TagSearch.new( tag: "ゆっくり実況プレイ",
7
12
  sort: :published_at,
8
13
  order: :asc,
data/spec/spec_helper.rb CHANGED
@@ -17,4 +17,12 @@ RSpec.configure do |config|
17
17
  # the seed, which is printed after each run.
18
18
  # --seed 1234
19
19
  config.order = 'random'
20
+
21
+ # config.before(:each) do
22
+ # WebMock.enable!
23
+ # end
24
+
25
+ config.after(:each) do
26
+ WebMock.disable!
27
+ end
20
28
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nicoquery
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.7
4
+ version: 0.1.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Masami Yonehara
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-11-18 00:00:00.000000000 Z
11
+ date: 2013-11-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -220,6 +220,7 @@ files:
220
220
  - .idea/nicoquery.iml
221
221
  - .idea/scopes/scope_settings.xml
222
222
  - .idea/vcs.xml
223
+ - .rspec
223
224
  - .ruby-version
224
225
  - .travis.yml
225
226
  - Gemfile
@@ -263,6 +264,8 @@ files:
263
264
  - spec/fixture/tag_search_403.rb
264
265
  - spec/fixture/tag_search_item.rb
265
266
  - spec/fixture/tag_search_meta.rb
267
+ - spec/fixture/tag_search_yukkuri_page1.rb
268
+ - spec/fixture/tag_search_yukkuri_page2.rb
266
269
  - spec/fixture/video_array_community.rb
267
270
  - spec/fixture/video_array_sm20415650_sm9.rb
268
271
  - spec/nicoquery_spec.rb
@@ -314,6 +317,8 @@ test_files:
314
317
  - spec/fixture/tag_search_403.rb
315
318
  - spec/fixture/tag_search_item.rb
316
319
  - spec/fixture/tag_search_meta.rb
320
+ - spec/fixture/tag_search_yukkuri_page1.rb
321
+ - spec/fixture/tag_search_yukkuri_page2.rb
317
322
  - spec/fixture/video_array_community.rb
318
323
  - spec/fixture/video_array_sm20415650_sm9.rb
319
324
  - spec/nicoquery_spec.rb