lib/fitting/matchers/response_matcher.rb in fitting-2.0.2 vs lib/fitting/matchers/response_matcher.rb in fitting-2.0.3
- old
+ new
@@ -1,16 +1,21 @@
require 'fitting/response'
require 'fitting/storage/documentation'
+require 'fitting/configuration'
module Fitting
module Matchers
class Response
def matches?(response)
@response = Fitting::Response.new(
response,
Fitting::Storage::Documentation.tomogram
)
- @response.fully_validates.valid?
+ if @response.within_prefix?(Fitting.configuration.prefix)
+ @response.fully_validates.valid?
+ else
+ true
+ end
end
def ===(other)
matches?(other)
end