capybara-ui 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/capybara/ui/matchers.rb +18 -6
- data/lib/capybara/ui/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dcfb980e16d78b2a0cd122a4ab32c1255114dad4
|
4
|
+
data.tar.gz: af7a72761816872bdd203da7f7004ce5fd1f5f14
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4c1daaea0cf723fd70bc1a060fb27d21eaa16fec209b2a6ae4fbce967ea6e0b80dc1739e1cf5c0bb22c14a9b25096b1af4f010c079a1db0cbd9ec436430878c5
|
7
|
+
data.tar.gz: d1453fd8bbad4ed729805351535e8aefed1a3bdc8a1bd7e33da31f0f0722cef6fc00f78a44bf744cdbb7089a1de2c9dfbfa9be8d746868321e043154d7cace8f
|
data/lib/capybara/ui/matchers.rb
CHANGED
@@ -1,12 +1,20 @@
|
|
1
|
+
def permitted_rspec_version?
|
2
|
+
actual_rspec_expectations_version >= required_rspec_expectations_version
|
3
|
+
end
|
4
|
+
|
5
|
+
def actual_rspec_expectations_version
|
6
|
+
Gem::Version.new(RSpec::Expectations::Version::STRING)
|
7
|
+
end
|
8
|
+
|
9
|
+
def required_rspec_expectations_version
|
10
|
+
Gem::Version.new(Capybara::UI::OptionalDependencies::RSPEC_VERSION)
|
11
|
+
end
|
12
|
+
|
1
13
|
begin
|
2
14
|
require 'rspec/matchers'
|
3
|
-
require 'rspec/version'
|
15
|
+
require 'rspec/expectations/version'
|
4
16
|
|
5
|
-
|
6
|
-
raise LoadError,
|
7
|
-
"requires RSpec version #{Capybara::UI::OptionalDependencies::RSPEC_VERSION} or later. " \
|
8
|
-
"You have #{RSpec::Version::STRING}."
|
9
|
-
end
|
17
|
+
raise LoadError unless permitted_rspec_version?
|
10
18
|
|
11
19
|
RSpec::Matchers.define :see do |widget_name, *args|
|
12
20
|
match do |role|
|
@@ -25,4 +33,8 @@ begin
|
|
25
33
|
end
|
26
34
|
end
|
27
35
|
end
|
36
|
+
|
37
|
+
rescue LoadError
|
38
|
+
"RSpec Expectations version #{required_rspec_expectations_version} or later is required. " \
|
39
|
+
"You have #{actual_rspec_expectations_version}."
|
28
40
|
end
|
data/lib/capybara/ui/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capybara-ui
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Leal
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2016-01-
|
12
|
+
date: 2016-01-26 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: chronic
|