spec/support/expect_violation.rb in rubocop-rspec-1.15.0 vs spec/support/expect_violation.rb in rubocop-rspec-1.15.1

- old
+ new

@@ -37,17 +37,18 @@ column_range: highlight.begin_pos...highlight.end_pos ) end class Expectation + include Adamantium + include Concord.new(:string) + VIOLATION_LINE_PATTERN = /\A *\^/ VIOLATION = :violation SOURCE = :line - include Adamantium, Concord.new(:string) - def source source_map.to_s end def assertions @@ -115,24 +116,24 @@ end end end class Assertion + include Adamantium + include Anima.new(:message, :column_range, :line_number) + include Comparable + def self.parse(text:, line_number:) parser = Parser.new(text) new( message: parser.message, column_range: parser.column_range, line_number: line_number ) end - include Anima.new(:message, :column_range, :line_number), - Adamantium, - Comparable - def <=>(other) to_a <=> other.to_a end protected @@ -140,12 +141,13 @@ def to_a [line_number, column_range.first, column_range.last, message] end class Parser - COLUMN_PATTERN = /^ *(?<carets>\^\^*) (?<message>.+)$/ + include Adamantium + include Concord.new(:text) - include Concord.new(:text), Adamantium + COLUMN_PATTERN = /^ *(?<carets>\^\^*) (?<message>.+)$/ def column_range Range.new(*match.offset(:carets), true) end