Module: TestsDoc::RecordSpecHelper
- Defined in:
- lib/tests_doc/record_spec_helper.rb
Instance Method Summary collapse
- #delete ⇒ Object
- #get ⇒ Object
- #post ⇒ Object
- #put ⇒ Object
- #recording_api_interaction(path: nil, key: nil, description: nil, whitelist: nil) ⇒ Object
Instance Method Details
#delete ⇒ Object
26 27 28 |
# File 'lib/tests_doc/record_spec_helper.rb', line 26 def delete(*) record_interaction { super } end |
#get ⇒ Object
14 15 16 |
# File 'lib/tests_doc/record_spec_helper.rb', line 14 def get(*) record_interaction { super } end |
#post ⇒ Object
18 19 20 |
# File 'lib/tests_doc/record_spec_helper.rb', line 18 def post(*) record_interaction { super } end |
#put ⇒ Object
22 23 24 |
# File 'lib/tests_doc/record_spec_helper.rb', line 22 def put(*) record_interaction { super } end |
#recording_api_interaction(path: nil, key: nil, description: nil, whitelist: nil) ⇒ Object
5 6 7 8 9 10 11 12 |
# File 'lib/tests_doc/record_spec_helper.rb', line 5 def recording_api_interaction(path: nil, key: nil, description: nil, whitelist: nil) TestsDoc.recorded_api_interaction = true TestsDoc. = OpenStruct.new(path: path, key: key, description: description, whitelist: whitelist) yield TestsDoc. ensure TestsDoc. = nil end |