Class: Expectations::StandardError
- Defined in:
- lib/expectations/standard_error.rb
Class Attribute Summary collapse
-
.outlet ⇒ Object
Returns the value of attribute outlet.
Class Method Summary collapse
Class Attribute Details
.outlet ⇒ Object
Returns the value of attribute outlet.
3 4 5 |
# File 'lib/expectations/standard_error.rb', line 3 def outlet @outlet end |
Class Method Details
.print(string) ⇒ Object
12 13 14 15 |
# File 'lib/expectations/standard_error.rb', line 12 def self.print(string) print_suggestion outlet.print string end |
.print_suggestion ⇒ Object
17 18 19 20 21 |
# File 'lib/expectations/standard_error.rb', line 17 def self.print_suggestion return if @suggestion_printed @suggestion_printed = true outlet.print "Expectations allows you to to create multiple mock expectations, but suggests that you write another test instead.\n" end |
.silence ⇒ Object
8 9 10 |
# File 'lib/expectations/standard_error.rb', line 8 def self.silence self.outlet = Silent end |