shoulda-matchers-cucumber 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
  SHA256:
3
- metadata.gz: 2e1fc8c83c23dc90fe258327da2fe3e3719ad1f34c640b0f49c3d376001303ca
4
- data.tar.gz: 6e5001e2371aefb0c5ba0d64c03716f61d0ee0b28a5ebcac366fc449b2bec193
3
+ metadata.gz: 50ced520daee6e1a6ddab27c1634064bc219903643d712b3a7cf0a3cbb12e761
4
+ data.tar.gz: 6f92423182000b4fb889ddaa20b718d3eb83353de79777505d842090a2c3c923
5
5
  SHA512:
6
- metadata.gz: '059d7157fc3666b6b904f0dd860ad65d033a1e810457a4660581aff6383bfb234d4eed886e6d8d47707a0691a93742d1a36b743e6589a0ba1088ecf75b3ab795'
7
- data.tar.gz: 299361f02763e8e68e25a59a564632d0ea111a64da763cbe3ec7bf0c2f277114145a58b03113b59899bef57289c1f2da9a8fa4431269898e53d6c6e6a6f6a387
6
+ metadata.gz: 983e998e5b105f8b4b844334b3d8e3c1dc28aab46f471da9784b0fc299543e3290af3d5107a0cd893f68852c11fb3fc343f429b61129f1e73248ed4097827cbd
7
+ data.tar.gz: d9c4e4dcc4f88bbdf1a6aeb894b3b8c9630683e9f5696b4ba6d8922452a5ca8d2b9c11349a622d0c55d631918fe54ed4869167d5b3eb1e75e8794e27410e11ca
data/.gitignore CHANGED
@@ -6,6 +6,8 @@
6
6
  /pkg/
7
7
  /spec/reports/
8
8
  /tmp/
9
-
9
+ *~
10
+ *.lock
11
+ .ruby-*
10
12
  # rspec failure tracking
11
13
  .rspec_status
data/README.md CHANGED
@@ -63,7 +63,7 @@ Scenario: Valid model of User
63
63
  Then the model is valid
64
64
  ```
65
65
 
66
- Then write its steps using shoylda matchers' syntax:
66
+ Then write its steps using shoulda matchers' syntax:
67
67
 
68
68
  ```ruby
69
69
  Given("default User model") do
@@ -1,7 +1,7 @@
1
1
  module Shoulda
2
2
  module Matchers
3
3
  module Cucumber
4
- VERSION = "1.0.0"
4
+ VERSION = "1.0.1"
5
5
  end
6
6
  end
7
7
  end
@@ -9,17 +9,21 @@ module Shoulda
9
9
  Integrations.register_test_framework(self, :cucumber)
10
10
 
11
11
  def validate!
12
- return if defined? RSpec::Matchers
13
- raise TestFrameworkNotFound, <<-EOT
14
- You have to include the 'rspec-expectations' gem to Gemfile, and add
15
- the line before requiring the shoulda matchers:
12
+ return if defined?(::RSpec) && defined?(::RSpec::Matchers)
16
13
 
17
- require 'rspec/expectations'
18
- EOT
14
+ raise_error
19
15
  end
20
16
 
21
17
  def include(*modules, **_options)
22
- RSpec::Matchers.send(:include, *modules)
18
+ ::RSpec::Matchers.send(:include, *modules)
19
+ rescue NameError
20
+ if (require("rspec/expectations"))
21
+ retry
22
+ else
23
+ raise_error
24
+ end
25
+ rescue LoadError
26
+ raise_error
23
27
  end
24
28
 
25
29
  def n_unit?
@@ -29,6 +33,15 @@ EOT
29
33
  def present?
30
34
  true
31
35
  end
36
+
37
+ def raise_error
38
+ raise TestFrameworkNotFound, <<-EOT
39
+ You have to include the 'rspec-expectations' gem to Gemfile, and add
40
+ the line before requiring the shoulda matchers:
41
+
42
+ require 'rspec/expectations'
43
+ EOT
44
+ end
32
45
  end
33
46
  end
34
47
  end
@@ -44,8 +44,8 @@ Gem::Specification.new do |spec|
44
44
  spec.add_development_dependency "pg", "~> 1.2.3"
45
45
  spec.add_development_dependency "bootsnap", "~> 1.4.6"
46
46
  spec.add_development_dependency "listen", "~> 3.0.5"
47
- spec.add_development_dependency "cucumber-rails", "~> 2.0"
47
+ spec.add_development_dependency "cucumber-rails", "~> 2.2"
48
48
  spec.add_runtime_dependency "shoulda-matchers", ">= 3.0.0", "< 5.0.0"
49
- spec.add_runtime_dependency "cucumber", "~> 3.0"
49
+ spec.add_runtime_dependency "cucumber", ">= 5.0.0", "< 6.0.0"
50
50
  spec.add_runtime_dependency "rspec-expectations", "~> 3.0"
51
51
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shoulda-matchers-cucumber
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
  - Малъ Скрылёвъ (Malo Skrylevo)
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-04-25 00:00:00.000000000 Z
11
+ date: 2020-12-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -128,14 +128,14 @@ dependencies:
128
128
  requirements:
129
129
  - - "~>"
130
130
  - !ruby/object:Gem::Version
131
- version: '2.0'
131
+ version: '2.2'
132
132
  type: :development
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
136
  - - "~>"
137
137
  - !ruby/object:Gem::Version
138
- version: '2.0'
138
+ version: '2.2'
139
139
  - !ruby/object:Gem::Dependency
140
140
  name: shoulda-matchers
141
141
  requirement: !ruby/object:Gem::Requirement
@@ -160,16 +160,22 @@ dependencies:
160
160
  name: cucumber
161
161
  requirement: !ruby/object:Gem::Requirement
162
162
  requirements:
163
- - - "~>"
163
+ - - ">="
164
164
  - !ruby/object:Gem::Version
165
- version: '3.0'
165
+ version: 5.0.0
166
+ - - "<"
167
+ - !ruby/object:Gem::Version
168
+ version: 6.0.0
166
169
  type: :runtime
167
170
  prerelease: false
168
171
  version_requirements: !ruby/object:Gem::Requirement
169
172
  requirements:
170
- - - "~>"
173
+ - - ">="
171
174
  - !ruby/object:Gem::Version
172
- version: '3.0'
175
+ version: 5.0.0
176
+ - - "<"
177
+ - !ruby/object:Gem::Version
178
+ version: 6.0.0
173
179
  - !ruby/object:Gem::Dependency
174
180
  name: rspec-expectations
175
181
  requirement: !ruby/object:Gem::Requirement