Class: Xlogin::Expectation
- Inherits:
-
Object
- Object
- Xlogin::Expectation
- Defined in:
- lib/xlogin/spec.rb
Instance Method Summary collapse
-
#initialize(session, *args) ⇒ Expectation
constructor
A new instance of Expectation.
- #not_to_match(regexp) ⇒ Object
- #to_match(regexp) ⇒ Object
Constructor Details
#initialize(session, *args) ⇒ Expectation
Returns a new instance of Expectation.
17 18 19 20 |
# File 'lib/xlogin/spec.rb', line 17 def initialize(session, *args) @session = session @args = args end |
Instance Method Details
#not_to_match(regexp) ⇒ Object
27 28 29 30 |
# File 'lib/xlogin/spec.rb', line 27 def not_to_match(regexp) return unless match(regexp) raise ExpectationError.new(@expect, @actual) end |
#to_match(regexp) ⇒ Object
22 23 24 25 |
# File 'lib/xlogin/spec.rb', line 22 def to_match(regexp) return if match(regexp) raise ExpectationError.new(@expect, @actual) end |