Class: RSpec::Terraform::Matchers::IncludeOutputChange
- Inherits:
-
Object
- Object
- RSpec::Terraform::Matchers::IncludeOutputChange
- Defined in:
- lib/rspec/terraform/matchers/include_output_change.rb
Overview
rubocop:disable Metrics/ClassLength
Instance Attribute Summary collapse
-
#definition ⇒ Object
readonly
Returns the value of attribute definition.
-
#plan ⇒ Object
readonly
Returns the value of attribute plan.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
- #failure_message ⇒ Object
-
#initialize(definition = {}) ⇒ IncludeOutputChange
constructor
A new instance of IncludeOutputChange.
- #matches?(plan) ⇒ Boolean
- #with_value(value) ⇒ Object
Constructor Details
#initialize(definition = {}) ⇒ IncludeOutputChange
Returns a new instance of IncludeOutputChange.
10 11 12 13 |
# File 'lib/rspec/terraform/matchers/include_output_change.rb', line 10 def initialize(definition = {}) @definition = definition @value = nil end |
Instance Attribute Details
#definition ⇒ Object (readonly)
Returns the value of attribute definition.
8 9 10 |
# File 'lib/rspec/terraform/matchers/include_output_change.rb', line 8 def definition @definition end |
#plan ⇒ Object (readonly)
Returns the value of attribute plan.
8 9 10 |
# File 'lib/rspec/terraform/matchers/include_output_change.rb', line 8 def plan @plan end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
8 9 10 |
# File 'lib/rspec/terraform/matchers/include_output_change.rb', line 8 def value @value end |
Instance Method Details
#failure_message ⇒ Object
26 27 28 29 |
# File 'lib/rspec/terraform/matchers/include_output_change.rb', line 26 def "\nexpected: #{positive_expected_line}" \ "\n got: #{positive_got_line}" end |
#matches?(plan) ⇒ Boolean
15 16 17 18 19 |
# File 'lib/rspec/terraform/matchers/include_output_change.rb', line 15 def matches?(plan) @plan = plan !value_matches(plan).empty? end |
#with_value(value) ⇒ Object
21 22 23 24 |
# File 'lib/rspec/terraform/matchers/include_output_change.rb', line 21 def with_value(value) @value = maybe_box_value(value) self end |