Class: FIXSpec::Matchers::HaveFIXPath
- Inherits:
-
Object
- Object
- FIXSpec::Matchers::HaveFIXPath
- Defined in:
- lib/fix_spec/matchers/have_fix_path.rb
Instance Attribute Summary collapse
-
#path ⇒ Object
readonly
Returns the value of attribute path.
Instance Method Summary collapse
- #description ⇒ Object
- #failure_message_for_should ⇒ Object
- #failure_message_for_should_not ⇒ Object
-
#initialize(path) ⇒ HaveFIXPath
constructor
A new instance of HaveFIXPath.
- #matches?(fix_message) ⇒ Boolean
Constructor Details
#initialize(path) ⇒ HaveFIXPath
6 7 8 9 |
# File 'lib/fix_spec/matchers/have_fix_path.rb', line 6 def initialize path @path = path @json_matcher = JsonSpec::Matchers::HaveJsonPath.new path end |
Instance Attribute Details
#path ⇒ Object (readonly)
Returns the value of attribute path.
4 5 6 |
# File 'lib/fix_spec/matchers/have_fix_path.rb', line 4 def path @path end |
Instance Method Details
#description ⇒ Object
25 26 27 |
# File 'lib/fix_spec/matchers/have_fix_path.rb', line 25 def description %(have Protobuf path "#{@path}") end |
#failure_message_for_should ⇒ Object
17 18 19 |
# File 'lib/fix_spec/matchers/have_fix_path.rb', line 17 def %(Expected FIX path "#{@path}") end |
#failure_message_for_should_not ⇒ Object
21 22 23 |
# File 'lib/fix_spec/matchers/have_fix_path.rb', line 21 def %(Expected no FIX path "#{@path}") end |
#matches?(fix_message) ⇒ Boolean
11 12 13 14 15 |
# File 'lib/fix_spec/matchers/have_fix_path.rb', line 11 def matches? fix_json = FIXSpec::Helpers.() @json_matcher.matches? fix_json end |