capybara_error_intel 0.1.1 → 0.1.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.
- checksums.yaml +4 -4
- data/.travis.yml +1 -0
- data/README.md +24 -2
- data/capybara_error_intel.gemspec +1 -1
- data/img/CapybaraErrorIntel.png +0 -0
- data/img/into_this.png +0 -0
- data/img/turn_this.png +0 -0
- data/lib/capybara_error_intel/version.rb +1 -1
- metadata +7 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f5e604de308508f4a6b425d6563b0b5dfcbd54d0
|
4
|
+
data.tar.gz: e3af7516188351093fc5c62b08dbbed26a571e27
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a4c816bc8b6767b5e67ac0632959aee5b8a7b85057b773f726cd2ce40b381856de108bbc2d9a06c4d8846ffcb6e4a22dc657c528e8ee6a22f56c8927a4f85516
|
7
|
+
data.tar.gz: 5f6b128f2f80ddcdcc4956e1cf83f1b805b59458c2a954133c9852b336d767534aee64b35babbf9451c9659e3cce7c8e5566a7bb1e4025104ade511e88910b93
|
data/.travis.yml
CHANGED
data/README.md
CHANGED
@@ -1,6 +1,16 @@
|
|
1
|
-
|
1
|
+

|
2
2
|
|
3
|
-
|
3
|
+
[](https://travis-ci.org/dkarter/capybara_error_intel)
|
4
|
+
|
5
|
+
Capybara provides excellent error messages for its built in predicate methods: `has_selector?`, `has_text?`, and `has_title?` but when those are used from Page Objects while exposing predicate methods from the PageObjects themselves the error messages are lost and all we get is `expected true, got false`. Including this module into your PageObject by adding `include CapybaraErrorIntel::DSL` after `include Capybara::DSL` will return the heuristic error messages.
|
6
|
+
|
7
|
+
## Example
|
8
|
+
|
9
|
+
Turn this:
|
10
|
+

|
11
|
+
|
12
|
+
Into this:
|
13
|
+

|
4
14
|
|
5
15
|
## Installation
|
6
16
|
|
@@ -36,6 +46,18 @@ module Pages
|
|
36
46
|
end
|
37
47
|
end
|
38
48
|
end
|
49
|
+
```
|
50
|
+
|
51
|
+
Now this page object can be used in an expressive assertion like so:
|
52
|
+
|
53
|
+
```ruby
|
54
|
+
feature "User signs in" do
|
55
|
+
scenario "redirected to posts index after sign in" do
|
56
|
+
#... do the sign in dance
|
57
|
+
post_index = Pages::PostIndex.new
|
58
|
+
expect(post_index).to be_on_page
|
59
|
+
end
|
60
|
+
end
|
39
61
|
```
|
40
62
|
|
41
63
|
Note: currently this gem only supports the following Capybara built-in predicate
|
@@ -35,6 +35,6 @@ Gem::Specification.new do |spec|
|
|
35
35
|
spec.add_development_dependency 'pry', '~> 0.10'
|
36
36
|
spec.add_development_dependency 'pry-byebug', '~> 3.4'
|
37
37
|
|
38
|
-
spec.add_runtime_dependency 'rspec', '~>
|
38
|
+
spec.add_runtime_dependency 'rspec', '~> 2.1'
|
39
39
|
spec.add_runtime_dependency 'capybara', '~> 2'
|
40
40
|
end
|
Binary file
|
data/img/into_this.png
ADDED
Binary file
|
data/img/turn_this.png
ADDED
Binary file
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capybara_error_intel
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dorian Karter
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-09-
|
11
|
+
date: 2016-09-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -146,14 +146,14 @@ dependencies:
|
|
146
146
|
requirements:
|
147
147
|
- - "~>"
|
148
148
|
- !ruby/object:Gem::Version
|
149
|
-
version: '
|
149
|
+
version: '2.1'
|
150
150
|
type: :runtime
|
151
151
|
prerelease: false
|
152
152
|
version_requirements: !ruby/object:Gem::Requirement
|
153
153
|
requirements:
|
154
154
|
- - "~>"
|
155
155
|
- !ruby/object:Gem::Version
|
156
|
-
version: '
|
156
|
+
version: '2.1'
|
157
157
|
- !ruby/object:Gem::Dependency
|
158
158
|
name: capybara
|
159
159
|
requirement: !ruby/object:Gem::Requirement
|
@@ -195,6 +195,9 @@ files:
|
|
195
195
|
- bin/console
|
196
196
|
- bin/setup
|
197
197
|
- capybara_error_intel.gemspec
|
198
|
+
- img/CapybaraErrorIntel.png
|
199
|
+
- img/into_this.png
|
200
|
+
- img/turn_this.png
|
198
201
|
- lib/capybara_error_intel.rb
|
199
202
|
- lib/capybara_error_intel/dsl.rb
|
200
203
|
- lib/capybara_error_intel/version.rb
|