faraday_cage 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,33 @@
1
+ require 'spec_helper'
2
+
3
+ describe FaradayCage do
4
+
5
+ describe '.configure' do
6
+
7
+ it 'yields the config singleton' do
8
+ expect { |block| FaradayCage.configure(&block) }.to yield_with_args(FaradayCage.config)
9
+ end
10
+ end
11
+
12
+ describe '.config' do
13
+
14
+ it 'returns an instance of FaradayCage::Config' do
15
+ expect(FaradayCage.config).to be_a(FaradayCage::Config)
16
+ end
17
+
18
+ it 'keeps the same instance' do
19
+ expect(FaradayCage.config.object_id).to eq(FaradayCage.config.object_id)
20
+ end
21
+ end
22
+
23
+ FaradayCage::Config.public_instance_methods(false).each do |method|
24
+
25
+ describe ".#{method}" do
26
+
27
+ it 'delegates to .config' do
28
+ FaradayCage.config.should_receive(method)
29
+ FaradayCage.send(method)
30
+ end
31
+ end
32
+ end
33
+ end
data/spec/spec.opts ADDED
@@ -0,0 +1,2 @@
1
+ --color
2
+ --format progress
@@ -0,0 +1,32 @@
1
+ $LOAD_PATH.unshift(File.dirname(__FILE__))
2
+ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
3
+
4
+ unless ENV['CI']
5
+ require 'simplecov'
6
+ SimpleCov.start do
7
+ add_filter '/spec/'
8
+ end
9
+ end
10
+
11
+ require 'rspec'
12
+ require 'faraday_cage'
13
+
14
+ RSpec.configure do |config|
15
+ # Run specs in random order to surface order dependencies. If you find an
16
+ # order dependency and want to debug it, you can fix the order by providing
17
+ # the seed, which is printed after each run.
18
+ # --seed 1234
19
+ config.order = 'random'
20
+
21
+ config.run_all_when_everything_filtered = true
22
+ config.treat_symbols_as_metadata_keys_with_true_values = true
23
+ config.expect_with(:rspec) { |c| c.syntax = :expect }
24
+
25
+ unless ENV['CI']
26
+ config.filter_run(focus: true)
27
+ end
28
+ end
29
+
30
+ # Requires supporting files with custom matchers and macros, etc,
31
+ # in ./support/ and its subdirectories.
32
+ Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }
metadata ADDED
@@ -0,0 +1,366 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: faraday_cage
3
+ version: !ruby/object:Gem::Version
4
+ prerelease:
5
+ version: 0.0.1
6
+ platform: ruby
7
+ authors:
8
+ - Gabriel Evans
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2013-02-05 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ type: :runtime
16
+ version_requirements: !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '1.0'
22
+ name: rack
23
+ prerelease: false
24
+ requirement: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: '1.0'
30
+ - !ruby/object:Gem::Dependency
31
+ type: :runtime
32
+ version_requirements: !ruby/object:Gem::Requirement
33
+ none: false
34
+ requirements:
35
+ - - ! '>='
36
+ - !ruby/object:Gem::Version
37
+ version: 0.5.4
38
+ name: rack-test
39
+ prerelease: false
40
+ requirement: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: 0.5.4
46
+ - !ruby/object:Gem::Dependency
47
+ type: :runtime
48
+ version_requirements: !ruby/object:Gem::Requirement
49
+ none: false
50
+ requirements:
51
+ - - ! '>='
52
+ - !ruby/object:Gem::Version
53
+ version: '0.8'
54
+ - - <
55
+ - !ruby/object:Gem::Version
56
+ version: '1.0'
57
+ name: faraday_middleware
58
+ prerelease: false
59
+ requirement: !ruby/object:Gem::Requirement
60
+ none: false
61
+ requirements:
62
+ - - ! '>='
63
+ - !ruby/object:Gem::Version
64
+ version: '0.8'
65
+ - - <
66
+ - !ruby/object:Gem::Version
67
+ version: '1.0'
68
+ - !ruby/object:Gem::Dependency
69
+ type: :runtime
70
+ version_requirements: !ruby/object:Gem::Requirement
71
+ none: false
72
+ requirements:
73
+ - - ! '>='
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ name: activesupport
77
+ prerelease: false
78
+ requirement: !ruby/object:Gem::Requirement
79
+ none: false
80
+ requirements:
81
+ - - ! '>='
82
+ - !ruby/object:Gem::Version
83
+ version: '0'
84
+ - !ruby/object:Gem::Dependency
85
+ type: :development
86
+ version_requirements: !ruby/object:Gem::Requirement
87
+ none: false
88
+ requirements:
89
+ - - ! '>='
90
+ - !ruby/object:Gem::Version
91
+ version: '0'
92
+ name: rake
93
+ prerelease: false
94
+ requirement: !ruby/object:Gem::Requirement
95
+ none: false
96
+ requirements:
97
+ - - ! '>='
98
+ - !ruby/object:Gem::Version
99
+ version: '0'
100
+ - !ruby/object:Gem::Dependency
101
+ type: :development
102
+ version_requirements: !ruby/object:Gem::Requirement
103
+ none: false
104
+ requirements:
105
+ - - ! '>='
106
+ - !ruby/object:Gem::Version
107
+ version: '0'
108
+ name: pry
109
+ prerelease: false
110
+ requirement: !ruby/object:Gem::Requirement
111
+ none: false
112
+ requirements:
113
+ - - ! '>='
114
+ - !ruby/object:Gem::Version
115
+ version: '0'
116
+ - !ruby/object:Gem::Dependency
117
+ type: :development
118
+ version_requirements: !ruby/object:Gem::Requirement
119
+ none: false
120
+ requirements:
121
+ - - ! '>='
122
+ - !ruby/object:Gem::Version
123
+ version: '0'
124
+ name: yard
125
+ prerelease: false
126
+ requirement: !ruby/object:Gem::Requirement
127
+ none: false
128
+ requirements:
129
+ - - ! '>='
130
+ - !ruby/object:Gem::Version
131
+ version: '0'
132
+ - !ruby/object:Gem::Dependency
133
+ type: :development
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ none: false
136
+ requirements:
137
+ - - ! '>='
138
+ - !ruby/object:Gem::Version
139
+ version: '0'
140
+ name: redcarpet
141
+ prerelease: false
142
+ requirement: !ruby/object:Gem::Requirement
143
+ none: false
144
+ requirements:
145
+ - - ! '>='
146
+ - !ruby/object:Gem::Version
147
+ version: '0'
148
+ - !ruby/object:Gem::Dependency
149
+ type: :development
150
+ version_requirements: !ruby/object:Gem::Requirement
151
+ none: false
152
+ requirements:
153
+ - - ! '>='
154
+ - !ruby/object:Gem::Version
155
+ version: '0'
156
+ name: rspec
157
+ prerelease: false
158
+ requirement: !ruby/object:Gem::Requirement
159
+ none: false
160
+ requirements:
161
+ - - ! '>='
162
+ - !ruby/object:Gem::Version
163
+ version: '0'
164
+ - !ruby/object:Gem::Dependency
165
+ type: :development
166
+ version_requirements: !ruby/object:Gem::Requirement
167
+ none: false
168
+ requirements:
169
+ - - ! '>='
170
+ - !ruby/object:Gem::Version
171
+ version: '0'
172
+ name: simplecov
173
+ prerelease: false
174
+ requirement: !ruby/object:Gem::Requirement
175
+ none: false
176
+ requirements:
177
+ - - ! '>='
178
+ - !ruby/object:Gem::Version
179
+ version: '0'
180
+ - !ruby/object:Gem::Dependency
181
+ type: :development
182
+ version_requirements: !ruby/object:Gem::Requirement
183
+ none: false
184
+ requirements:
185
+ - - ! '>='
186
+ - !ruby/object:Gem::Version
187
+ version: '0'
188
+ name: guard
189
+ prerelease: false
190
+ requirement: !ruby/object:Gem::Requirement
191
+ none: false
192
+ requirements:
193
+ - - ! '>='
194
+ - !ruby/object:Gem::Version
195
+ version: '0'
196
+ - !ruby/object:Gem::Dependency
197
+ type: :development
198
+ version_requirements: !ruby/object:Gem::Requirement
199
+ none: false
200
+ requirements:
201
+ - - ! '>='
202
+ - !ruby/object:Gem::Version
203
+ version: '0'
204
+ name: guard-bundler
205
+ prerelease: false
206
+ requirement: !ruby/object:Gem::Requirement
207
+ none: false
208
+ requirements:
209
+ - - ! '>='
210
+ - !ruby/object:Gem::Version
211
+ version: '0'
212
+ - !ruby/object:Gem::Dependency
213
+ type: :development
214
+ version_requirements: !ruby/object:Gem::Requirement
215
+ none: false
216
+ requirements:
217
+ - - ! '>='
218
+ - !ruby/object:Gem::Version
219
+ version: '0'
220
+ name: guard-rspec
221
+ prerelease: false
222
+ requirement: !ruby/object:Gem::Requirement
223
+ none: false
224
+ requirements:
225
+ - - ! '>='
226
+ - !ruby/object:Gem::Version
227
+ version: '0'
228
+ - !ruby/object:Gem::Dependency
229
+ type: :development
230
+ version_requirements: !ruby/object:Gem::Requirement
231
+ none: false
232
+ requirements:
233
+ - - ! '>='
234
+ - !ruby/object:Gem::Version
235
+ version: '0'
236
+ name: guard-yard
237
+ prerelease: false
238
+ requirement: !ruby/object:Gem::Requirement
239
+ none: false
240
+ requirements:
241
+ - - ! '>='
242
+ - !ruby/object:Gem::Version
243
+ version: '0'
244
+ - !ruby/object:Gem::Dependency
245
+ type: :development
246
+ version_requirements: !ruby/object:Gem::Requirement
247
+ none: false
248
+ requirements:
249
+ - - ! '>='
250
+ - !ruby/object:Gem::Version
251
+ version: '0'
252
+ name: rb-fsevent
253
+ prerelease: false
254
+ requirement: !ruby/object:Gem::Requirement
255
+ none: false
256
+ requirements:
257
+ - - ! '>='
258
+ - !ruby/object:Gem::Version
259
+ version: '0'
260
+ - !ruby/object:Gem::Dependency
261
+ type: :development
262
+ version_requirements: !ruby/object:Gem::Requirement
263
+ none: false
264
+ requirements:
265
+ - - ! '>='
266
+ - !ruby/object:Gem::Version
267
+ version: '0'
268
+ name: rb-inotify
269
+ prerelease: false
270
+ requirement: !ruby/object:Gem::Requirement
271
+ none: false
272
+ requirements:
273
+ - - ! '>='
274
+ - !ruby/object:Gem::Version
275
+ version: '0'
276
+ - !ruby/object:Gem::Dependency
277
+ type: :development
278
+ version_requirements: !ruby/object:Gem::Requirement
279
+ none: false
280
+ requirements:
281
+ - - ! '>='
282
+ - !ruby/object:Gem::Version
283
+ version: '0'
284
+ name: growl
285
+ prerelease: false
286
+ requirement: !ruby/object:Gem::Requirement
287
+ none: false
288
+ requirements:
289
+ - - ! '>='
290
+ - !ruby/object:Gem::Version
291
+ version: '0'
292
+ description: Faraday Cage allows you to use Faraday for making requests to your REST
293
+ APIs in integration testing, minus the boilerplate code and crufty parsing and encoding
294
+ of requests and responses.
295
+ email:
296
+ - gabe@tabeso.com
297
+ executables: []
298
+ extensions: []
299
+ extra_rdoc_files: []
300
+ files:
301
+ - .gitignore
302
+ - .pryrc
303
+ - .travis.yml
304
+ - .yardopts
305
+ - Gemfile
306
+ - Guardfile
307
+ - LICENSE.txt
308
+ - README.md
309
+ - Rakefile
310
+ - faraday_cage.gemspec
311
+ - lib/faraday_cage.rb
312
+ - lib/faraday_cage/config.rb
313
+ - lib/faraday_cage/errors.rb
314
+ - lib/faraday_cage/helpers.rb
315
+ - lib/faraday_cage/rack_middleware.rb
316
+ - lib/faraday_cage/response.rb
317
+ - lib/faraday_cage/rspec.rb
318
+ - lib/faraday_cage/server.rb
319
+ - lib/faraday_cage/status.rb
320
+ - lib/faraday_cage/version.rb
321
+ - spec/faraday_cage/config_spec.rb
322
+ - spec/faraday_cage/rack_middleware_spec.rb
323
+ - spec/faraday_cage/server_spec.rb
324
+ - spec/faraday_cage/status_spec.rb
325
+ - spec/faraday_cage_spec.rb
326
+ - spec/spec.opts
327
+ - spec/spec_helper.rb
328
+ homepage: https://github.com/tabeso/faraday_cage
329
+ licenses: []
330
+ post_install_message:
331
+ rdoc_options: []
332
+ require_paths:
333
+ - lib
334
+ required_ruby_version: !ruby/object:Gem::Requirement
335
+ none: false
336
+ requirements:
337
+ - - ! '>='
338
+ - !ruby/object:Gem::Version
339
+ segments:
340
+ - 0
341
+ hash: 3109844551351928521
342
+ version: '0'
343
+ required_rubygems_version: !ruby/object:Gem::Requirement
344
+ none: false
345
+ requirements:
346
+ - - ! '>='
347
+ - !ruby/object:Gem::Version
348
+ segments:
349
+ - 0
350
+ hash: 3109844551351928521
351
+ version: '0'
352
+ requirements: []
353
+ rubyforge_project:
354
+ rubygems_version: 1.8.24
355
+ signing_key:
356
+ specification_version: 3
357
+ summary: Use Faraday to integration test your REST applications.
358
+ test_files:
359
+ - spec/faraday_cage/config_spec.rb
360
+ - spec/faraday_cage/rack_middleware_spec.rb
361
+ - spec/faraday_cage/server_spec.rb
362
+ - spec/faraday_cage/status_spec.rb
363
+ - spec/faraday_cage_spec.rb
364
+ - spec/spec.opts
365
+ - spec/spec_helper.rb
366
+ has_rdoc: