Class: Concordion::ErrorCondition
- Inherits:
-
Object
- Object
- Concordion::ErrorCondition
- Defined in:
- lib/concordion/error_condition.rb
Instance Attribute Summary collapse
-
#actual ⇒ Object
readonly
Returns the value of attribute actual.
-
#expected ⇒ Object
readonly
Returns the value of attribute expected.
Instance Method Summary collapse
-
#initialize(expected, actual, xpath, context = nil, assert_true_command = false) ⇒ ErrorCondition
constructor
A new instance of ErrorCondition.
- #to_s ⇒ Object
Constructor Details
#initialize(expected, actual, xpath, context = nil, assert_true_command = false) ⇒ ErrorCondition
Returns a new instance of ErrorCondition.
8 9 10 11 12 13 14 |
# File 'lib/concordion/error_condition.rb', line 8 def initialize(expected, actual, xpath, context = nil, assert_true_command = false) @expected = expected @actual = actual @xpath = xpath @context = context @assert_true_command = assert_true_command end |
Instance Attribute Details
#actual ⇒ Object (readonly)
Returns the value of attribute actual.
7 8 9 |
# File 'lib/concordion/error_condition.rb', line 7 def actual @actual end |
#expected ⇒ Object (readonly)
Returns the value of attribute expected.
7 8 9 |
# File 'lib/concordion/error_condition.rb', line 7 def expected @expected end |
Instance Method Details
#to_s ⇒ Object
16 17 18 19 20 21 22 23 24 25 |
# File 'lib/concordion/error_condition.rb', line 16 def to_s @expected = "true" if @assert_true_command base = "expected (#{@expected}) but got (#{@actual}) in tag: #{@xpath}" return base if @context.nil? base + "\n\tcontext of error: #{@context}" end |