rspeckled 1.1.2 → 1.1.3
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
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/lib/rspeckled/plugins.rb +36 -11
- data/lib/rspeckled/plugins/configuration/vcr.rb +5 -0
- data/lib/rspeckled/version.rb +1 -1
- metadata +1 -1
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f2242b4977c2138c909d8092427a5cd4c5d156555f33d27cbea35ac1a0c5d66b
|
4
|
+
data.tar.gz: bab6b43c24e59de2df055c0591860f6d225a71d83711b306ae25bcf64ca7407a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c923ead3e522635a882f5da44de06f7cf4f90ecfccab83599a85b56075af0867164bd7271909c4b2418ba9e1559841b974aa0c07ffb8fd4cfc017ff881e91a62
|
7
|
+
data.tar.gz: d45aef40ab984bc8d0d596095197958511a50594038c460e309c19706e3227b58cf31eb6124e342e8b3e9f6477a01236a75f5a1ce930ffafb6172e04f148bc5a
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/lib/rspeckled/plugins.rb
CHANGED
@@ -2,6 +2,24 @@
|
|
2
2
|
|
3
3
|
require 'pp'
|
4
4
|
|
5
|
+
################################################################################
|
6
|
+
# Test Gem Requires
|
7
|
+
#
|
8
|
+
# These are gems which, if they exist, we generally want to load. Ideally we'd
|
9
|
+
# be able to do this only if there were tests with the proper metadata
|
10
|
+
# specifying that we want to use these gems, however due to load order, they
|
11
|
+
# must be required here.
|
12
|
+
#
|
13
|
+
# Below, we throw exceptions for each gem if the user requests that a test use
|
14
|
+
# these gems, but the load failed (due to it not being in the gemspec/Gemfile).
|
15
|
+
#
|
16
|
+
# rubocop:disable Layout/EmptyLinesAroundExceptionHandlingKeywords
|
17
|
+
begin; require 'email_spec'; rescue LoadError; end
|
18
|
+
begin; require 'timecop'; rescue LoadError; end
|
19
|
+
begin; require 'webmock'; rescue LoadError; end
|
20
|
+
begin; require 'vcr'; rescue LoadError; end
|
21
|
+
|
22
|
+
# rubocop:enable Layout/EmptyLinesAroundExceptionHandlingKeywords
|
5
23
|
################################################################################
|
6
24
|
# Configuration
|
7
25
|
#
|
@@ -28,6 +46,7 @@ require 'rspeckled/plugins/configuration/selenium_webdriver' if defined?(::Sele
|
|
28
46
|
require 'rspeckled/plugins/configuration/shoulda' if defined?(::Shoulda::Matchers)
|
29
47
|
require 'rspeckled/plugins/configuration/sidekiq' if defined?(::Sidekiq)
|
30
48
|
require 'rspeckled/plugins/configuration/test_after_commit' if defined?(::TestAfterCommit)
|
49
|
+
require 'rspeckled/plugins/configuration/vcr' if defined?(::VCR)
|
31
50
|
require 'rspeckled/plugins/configuration/warden' if defined?(::Warden)
|
32
51
|
require 'rspeckled/plugins/configuration/webmock' if defined?(::WebMock)
|
33
52
|
require 'rspeckled/plugins/configuration/wisper' if defined?(::Wisper)
|
@@ -91,28 +110,34 @@ require 'rspeckled/plugins/extensions/omniauth' if defined?(::Omni
|
|
91
110
|
# Setup for APIs by Always Allowing 'id' and Fail Fast By Raising on Unpermitted Parameters
|
92
111
|
require 'rspeckled/plugins/extensions/strong_parameters' if defined?(::ActionController::Parameters)
|
93
112
|
|
113
|
+
# Register Matchers Which Ignore Trailing UUID/GUIDs in URLs
|
114
|
+
require 'rspeckled/plugins/extensions/vcr' if defined?(::VCR)
|
115
|
+
|
94
116
|
################################################################################
|
95
117
|
# Automatic Gem Requirements
|
96
118
|
#
|
97
119
|
RSpec.configure do |config|
|
98
120
|
config.when_first_matching_example_defined(:email) do
|
99
|
-
|
121
|
+
unless defined?(::EmailSpec)
|
122
|
+
fail LoadError, "Add 'email_spec' to your gemspec for Gemfile to use the :email metadata"
|
123
|
+
end
|
100
124
|
end
|
101
125
|
|
102
126
|
config.when_first_matching_example_defined(:time_mock) do
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
config.when_first_matching_example_defined(:webmock) do
|
107
|
-
require 'webmock'
|
127
|
+
unless defined?(::Timecop)
|
128
|
+
fail LoadError, "Add 'timecop' to your gemspec for Gemfile to use the :time_mock metadata"
|
129
|
+
end
|
108
130
|
end
|
109
131
|
|
110
132
|
config.when_first_matching_example_defined(:vcr) do
|
111
|
-
|
112
|
-
|
113
|
-
|
133
|
+
unless defined?(::VCR)
|
134
|
+
fail LoadError, "Add 'vcr' to your gemspec for Gemfile to use the :vcr metadata"
|
135
|
+
end
|
136
|
+
end
|
114
137
|
|
115
|
-
|
116
|
-
|
138
|
+
config.when_first_matching_example_defined(:webmock) do
|
139
|
+
unless defined?(::WebMock)
|
140
|
+
fail LoadError, "Add 'webmock' to your gemspec for Gemfile to use the :webmock metadata"
|
141
|
+
end
|
117
142
|
end
|
118
143
|
end
|
@@ -22,5 +22,10 @@ end
|
|
22
22
|
config.cassette_library_dir = ::File.expand_path('./tmp/vcr_cassettes')
|
23
23
|
config.allow_http_connections_when_no_cassette = true
|
24
24
|
|
25
|
+
config.default_cassette_options = {
|
26
|
+
:record => :once,
|
27
|
+
:re_record_interval => 2_592_000,
|
28
|
+
}
|
29
|
+
|
25
30
|
config.configure_rspec_metadata!
|
26
31
|
end
|
data/lib/rspeckled/version.rb
CHANGED
metadata
CHANGED
metadata.gz.sig
CHANGED
Binary file
|