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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8569e04fe7e820a732b875283667700db0021f11
4
- data.tar.gz: eab7f283b1ac93ceb0a1ff5db4d4319bf4f8b687
3
+ metadata.gz: dcfb980e16d78b2a0cd122a4ab32c1255114dad4
4
+ data.tar.gz: af7a72761816872bdd203da7f7004ce5fd1f5f14
5
5
  SHA512:
6
- metadata.gz: 703a2e188f63c0e896b1a9df815dad5df846bcb30882d6618168b207b2f19a6736f84ddfe3c2751ed2cd92f536355c0320e0ea53de0964c562aa0704ac9db33d
7
- data.tar.gz: cd41f9dd5368aba4585a365c321b399aa3c55c329990f68f66b4ebbd1181de4f98dc429c9d85f959176b559035db89e6003d8945ea4cfd0feeb8196d5d18a3cb
6
+ metadata.gz: 4c1daaea0cf723fd70bc1a060fb27d21eaa16fec209b2a6ae4fbce967ea6e0b80dc1739e1cf5c0bb22c14a9b25096b1af4f010c079a1db0cbd9ec436430878c5
7
+ data.tar.gz: d1453fd8bbad4ed729805351535e8aefed1a3bdc8a1bd7e33da31f0f0722cef6fc00f78a44bf744cdbb7089a1de2c9dfbfa9be8d746868321e043154d7cace8f
@@ -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
- unless Gem::Version.new(RSpec::Version::STRING) >= Gem::Version.new(Capybara::UI::OptionalDependencies::RSPEC_VERSION)
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
@@ -1,5 +1,5 @@
1
1
  module Capybara
2
2
  module UI
3
- VERSION = '1.0.0'
3
+ VERSION = '1.0.1'
4
4
  end
5
5
  end
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.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-22 00:00:00.000000000 Z
12
+ date: 2016-01-26 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: chronic