alparser 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -22,6 +22,8 @@ def request_from file
22
22
  File.new("./spec/requests/#{file}")
23
23
  end
24
24
 
25
+ Dir["./spec/support/**/*.rb"].sort.each {|f| require f}
26
+
25
27
  RSpec.configure do |config|
26
28
  config.fail_fast = ENV['RSPEC_FAIL_FAST'] == "1"
27
29
  config.mock_framework = :rspec # :mocha
@@ -0,0 +1,38 @@
1
+ require "spec_helper"
2
+
3
+ shared_examples "parser" do
4
+
5
+ it { expect(subject).to respond_to :all_club_climbs }
6
+
7
+ context "#all_club_climbs" do
8
+ it { expect(subject.all_club_climbs).not_to be_empty }
9
+
10
+ context ".first" do
11
+ let!(:first){ subject.all_club_climbs.first }
12
+
13
+ it { expect(first).to be_kind_of Alparser::Climb }
14
+
15
+ it { expect(first).to respond_to :route }
16
+ it { expect(first).to respond_to :mountain_range }
17
+ it { expect(first).to respond_to :country }
18
+ it { expect(first).to respond_to :country_id }
19
+ it { expect(first).to respond_to :user }
20
+ it { expect(first).to respond_to :kind }
21
+ it { expect(first).to respond_to :has_notes, :has_images }
22
+
23
+ it { expect(first.user).to be_kind_of Alparser::User }
24
+ it { expect(first).to respond_to :user_id }
25
+ it { expect(first).to respond_to :user_name }
26
+
27
+ it { expect(first).to respond_to :base_uri }
28
+ it { expect(first).to respond_to :f_id }
29
+ it { expect(first.f_id).not_to be_nil }
30
+ end
31
+ end
32
+
33
+ context "#number_of_pages" do
34
+ before { subject.all_club_climbs }
35
+ it { expect(subject.number_of_pages).not_to eq 0 }
36
+ end
37
+
38
+ end
metadata CHANGED
@@ -1,43 +1,43 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: alparser
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Oto Brglez
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-02-04 00:00:00.000000000 Z
11
+ date: 2014-02-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">="
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '0'
19
+ version: '0.12'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ">="
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '0'
26
+ version: '0.12'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: nokogiri
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ">="
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '0'
33
+ version: '1.6'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ">="
38
+ - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '0'
40
+ version: '1.6'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: bundler
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -170,8 +170,12 @@ files:
170
170
  - spec/requests/kozjak_club_climbs_p4.txt
171
171
  - spec/requests/kozjak_club_climbs_p5.txt
172
172
  - spec/requests/kozjak_club_climbs_p6.txt
173
+ - spec/requests/pdtam_p1.txt
174
+ - spec/requests/pdtam_p2.txt
175
+ - spec/requests/pdtam_p3.txt
173
176
  - spec/requests/plezanje_n1000.txt
174
177
  - spec/spec_helper.rb
178
+ - spec/support/parser.rb
175
179
  homepage: ''
176
180
  licenses:
177
181
  - MIT
@@ -207,5 +211,9 @@ test_files:
207
211
  - spec/requests/kozjak_club_climbs_p4.txt
208
212
  - spec/requests/kozjak_club_climbs_p5.txt
209
213
  - spec/requests/kozjak_club_climbs_p6.txt
214
+ - spec/requests/pdtam_p1.txt
215
+ - spec/requests/pdtam_p2.txt
216
+ - spec/requests/pdtam_p3.txt
210
217
  - spec/requests/plezanje_n1000.txt
211
218
  - spec/spec_helper.rb
219
+ - spec/support/parser.rb