xpath-specs 0.0.2 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ZWNkNzJkN2RlODc2OTYyMDc2NmJkN2ZlMDg2MTU1NjdkYzNjOTljNw==
4
+ NGE1YTQ0Yjc4NWE3OWQ0MTU3NjVhMGYzNWVhNjc3Mjc3NmNkYmNkMw==
5
5
  data.tar.gz: !binary |-
6
- NzhkZTliYWUxNDBiOWZjYjQ3NTEwNjZkZDBkN2M2NGUxNDQyMWU0Yg==
6
+ N2JlZjFkYTI1ZjliMjBiOTA4Yzk2NGQwMmRhM2ZlN2RlNWEyOWZmZQ==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- NWUwMTIxNTVlY2U1OWMyODI0MjI4YzExYTYxNzIwZTk1NmM5MDhmOGYxNDk3
10
- NWYxNjQwZjRmNjBiNGQ0YzI4MjMwNjQ2MjhiMzg2MjE3MDI3ZDFlZWI4MmMx
11
- YzZmYzQ3ZGY4MmE3ZjliZmYxYTkwYTExN2EyM2RhNDJmNzNjYjQ=
9
+ NTJiMmFhYjdiOGNiNzU2YjU1ZGEyMjFlM2JiMTI2OGVkZWQxMDQ2MmY1MjE0
10
+ ZTUzZTdiOTgwNmFjYmY0Y2ZmNGUwNDYzNzI0NDk4YWY5YjRmNTUwODc1Y2U5
11
+ Njc0OWZlMDdjYThjN2Y4NmQ5MDVhMzgyMGM3ZTRlYzIwZjAwMTk=
12
12
  data.tar.gz: !binary |-
13
- NGFiN2RmNmJlNGY0MmQxY2M0N2MwNTVhNTg3NTRkNzQ5NmQ0N2EwN2M4YzMx
14
- MmZkNTVhOWQxOGFjOThjNDRlNmQyZjBmNjk1OTYyNTM1N2M2MjIwZGViMjE0
15
- MzIyNDQxYjAzMmIyOGMwNzJjZDMyYzY5MzExMDk3MGY3NjQ4MzY=
13
+ ZGQ3M2QxY2FjNDM5YmI2ZmU2ZjMxOGQyMjYyNDUzM2M3ODIyN2FlMDFiNGRi
14
+ ZWViOTMzN2RiMjU1MTlkNWIyNmVkNmExM2NmNzc2NjgxOWY0OGQ3YmI5Yzdi
15
+ OGM0M2VkYjdmNDViZTVhZTc0M2RhNWY1ZTAyMzdlMzM5MWZjYWY=
@@ -1,2 +1,3 @@
1
- -���
2
- ���9H��^�\�&x]�s���po����S����
1
+ ���j�F��D�T�����=T�!U�t!��O�������̒)i�a�)o��|��X��_2#f�`���k<����3lC,6?��B/��i
2
+ @�ϑy<�=v�/D֬�3E�����oY���S
3
+ G�>K^� ��"�R�Q3�>ws.����~� �K�%or[��<Dh�'`lYM��K��O1���R�Q�T��d�2����K���d-Ϛ[Zv%�V�����rY6A����}�2HKF��-����=�
data.tar.gz.sig CHANGED
Binary file
@@ -3,4 +3,7 @@ rvm:
3
3
  - 2.1.1
4
4
  - 2.0.0
5
5
  script: bundle exec rake
6
+ addons:
7
+ code_climate:
8
+ repo_token: 43e89ddce0e1bc26b55c0f7c274b3aec8585a6eb0b887c4dc32e5a658db3dd96
6
9
 
data/README.md CHANGED
@@ -1,3 +1,5 @@
1
+ [![Build Status](https://travis-ci.org/philou/xpath-specs.svg?branch=master)](https://travis-ci.org/philou/xpath-specs) [![Test Coverage](https://codeclimate.com/github/philou/xpath-specs/badges/coverage.svg)](https://codeclimate.com/github/philou/xpath-specs) [![Code Climate](https://codeclimate.com/github/philou/xpath-specs/badges/gpa.svg)](https://codeclimate.com/github/philou/xpath-specs)
2
+
1
3
  # Xpath::Specs
2
4
 
3
5
  An RSpec library to get better messages when matching XPaths
@@ -97,6 +99,14 @@ expected the page to contain a dish that is named Grilled Lobster (//table[@id='
97
99
  but not a dish that is named Grilled Lobster (//table[@id='dish-panel']//tr[td[contains(.,'#{name}')]])
98
100
  ```
99
101
 
102
+ ### Testing from Cucumber
103
+
104
+ Just use the 'page' in place of your view :
105
+
106
+ ```ruby
107
+ expect(page).to contain_a(dish_panel)
108
+ ```
109
+
100
110
  ## Contributing
101
111
 
102
112
  1. Fork it
@@ -16,11 +16,11 @@ module Xpath
16
16
  doc_contains(@page_part)
17
17
  end
18
18
 
19
- def failure_message_for_should
20
- failure_message_for_should_ex(@page_part)
19
+ def failure_message
20
+ failure_message_ex(@page_part)
21
21
  end
22
22
 
23
- def failure_message_for_should_not
23
+ def failure_message_when_negated
24
24
  "expected the page not to contain #{@page_part.long_description})"
25
25
  end
26
26
 
@@ -46,9 +46,9 @@ module Xpath
46
46
  !matched_node(page_part).empty?
47
47
  end
48
48
 
49
- def failure_message_for_should_ex(page_part)
49
+ def failure_message_ex(page_part)
50
50
  if parent_cannot_be_found(page_part)
51
- failure_message_for_should_ex(page_part.parent)
51
+ failure_message_ex(page_part.parent)
52
52
  elsif !page_part.has_parent
53
53
  [description,
54
54
  "but could not find #{page_part.long_description}"].join("\n")
@@ -1,5 +1,5 @@
1
1
  module Xpath
2
2
  module Specs
3
- VERSION = "0.0.2"
3
+ VERSION = "0.1.0"
4
4
  end
5
5
  end
@@ -1,3 +1,6 @@
1
1
  # -*- encoding: utf-8 -*-
2
2
 
3
+ require "codeclimate-test-reporter"
4
+ CodeClimate::TestReporter.start
5
+
3
6
  require 'xpath/specs'
@@ -18,10 +18,11 @@ Gem::Specification.new do |spec|
18
18
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
19
  spec.require_paths = ["lib"]
20
20
 
21
- spec.add_development_dependency "nokogiri"
21
+ spec.add_dependency "nokogiri", "~> 1.0"
22
+ spec.add_dependency "rspec", "~> 3.0"
22
23
 
23
24
  spec.add_development_dependency "bundler"
24
25
  spec.add_development_dependency "rake"
25
26
  spec.add_development_dependency "guard-rspec"
26
-
27
+ spec.add_development_dependency "codeclimate-test-reporter"
27
28
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: xpath-specs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Philou
@@ -38,10 +38,38 @@ cert_chain:
38
38
  NU5zd3dIY0llUVpCL05JRDdiZXJJZjlhd3gzCnlMY2wxY21tNUFMdEovK0Jr
39
39
  a21wMGk0YW1YZVRETXZxOXI4UEJzVnNRd3hZT1lKQlArVW14ejNQWDZIakZI
40
40
  clEKWGRrWHgzb1oKLS0tLS1FTkQgQ0VSVElGSUNBVEUtLS0tLQo=
41
- date: 2014-05-18 00:00:00.000000000 Z
41
+ date: 2014-08-25 00:00:00.000000000 Z
42
42
  dependencies:
43
43
  - !ruby/object:Gem::Dependency
44
44
  name: nokogiri
45
+ requirement: !ruby/object:Gem::Requirement
46
+ requirements:
47
+ - - ~>
48
+ - !ruby/object:Gem::Version
49
+ version: '1.0'
50
+ type: :runtime
51
+ prerelease: false
52
+ version_requirements: !ruby/object:Gem::Requirement
53
+ requirements:
54
+ - - ~>
55
+ - !ruby/object:Gem::Version
56
+ version: '1.0'
57
+ - !ruby/object:Gem::Dependency
58
+ name: rspec
59
+ requirement: !ruby/object:Gem::Requirement
60
+ requirements:
61
+ - - ~>
62
+ - !ruby/object:Gem::Version
63
+ version: '3.0'
64
+ type: :runtime
65
+ prerelease: false
66
+ version_requirements: !ruby/object:Gem::Requirement
67
+ requirements:
68
+ - - ~>
69
+ - !ruby/object:Gem::Version
70
+ version: '3.0'
71
+ - !ruby/object:Gem::Dependency
72
+ name: bundler
45
73
  requirement: !ruby/object:Gem::Requirement
46
74
  requirements:
47
75
  - - ! '>='
@@ -55,7 +83,7 @@ dependencies:
55
83
  - !ruby/object:Gem::Version
56
84
  version: '0'
57
85
  - !ruby/object:Gem::Dependency
58
- name: bundler
86
+ name: rake
59
87
  requirement: !ruby/object:Gem::Requirement
60
88
  requirements:
61
89
  - - ! '>='
@@ -69,7 +97,7 @@ dependencies:
69
97
  - !ruby/object:Gem::Version
70
98
  version: '0'
71
99
  - !ruby/object:Gem::Dependency
72
- name: rake
100
+ name: guard-rspec
73
101
  requirement: !ruby/object:Gem::Requirement
74
102
  requirements:
75
103
  - - ! '>='
@@ -83,7 +111,7 @@ dependencies:
83
111
  - !ruby/object:Gem::Version
84
112
  version: '0'
85
113
  - !ruby/object:Gem::Dependency
86
- name: guard-rspec
114
+ name: codeclimate-test-reporter
87
115
  requirement: !ruby/object:Gem::Requirement
88
116
  requirements:
89
117
  - - ! '>='
metadata.gz.sig CHANGED
Binary file