class RubyEventStore::RSpec::BeEvent::DataMatcher
Public Class Methods
new(expected, strict:)
click to toggle source
# File lib/ruby_event_store/rspec/be_event.rb, line 17 def initialize(expected, strict:) @strict = strict @expected = expected end
Public Instance Methods
matches?(actual)
click to toggle source
# File lib/ruby_event_store/rspec/be_event.rb, line 22 def matches?(actual) return true unless @expected matcher = @strict ? ::RSpec::Matchers::BuiltIn::Match : ::RSpec::Matchers::BuiltIn::Include matcher.new(@expected).matches?(actual) end