Class: Pork::Executor
- Inherits:
-
Object
- Object
- Pork::Executor
- Defined in:
- lib/rest-core/test.rb
Instance Method Summary collapse
Instance Method Details
#stub_select_for_stringio ⇒ Object
25 26 27 28 |
# File 'lib/rest-core/test.rb', line 25 def stub_select_for_stringio stub(IO).select(where([is_a(StringIO)]), [], [], RestCore::EventSource::READ_WAIT){ |rd, *| rd } end |
#with_img ⇒ Object
15 16 17 18 19 20 21 22 23 |
# File 'lib/rest-core/test.rb', line 15 def with_img f = Tempfile.new(['img', '.jpg']) n = File.basename(f.path) f.write('a'*10) f.rewind yield(f, n) ensure f.close! end |