Module: DbAgile::Environment::Testing
- Defined in:
- lib/dbagile/environment/testing.rb
Instance Method Summary collapse
-
#has_flushed?(rx) ⇒ Boolean
Returns true if the current output buffer matches a regular expression.
-
#output_buffer_str ⇒ Object
Returns the output buffer as a string.
Instance Method Details
#has_flushed?(rx) ⇒ Boolean
Returns true if the current output buffer matches a regular expression
17 18 19 |
# File 'lib/dbagile/environment/testing.rb', line 17 def has_flushed?(rx) (self.output_buffer_str =~ rx) ? true : false end |
#output_buffer_str ⇒ Object
Returns the output buffer as a string
6 7 8 9 10 11 12 |
# File 'lib/dbagile/environment/testing.rb', line 6 def output_buffer_str if self.output_buffer.kind_of?(StringIO) output_buffer.string else raise DbAgile::AssumptionFailedError, "StringIO expected as output buffer" end end |