lib/phi_attrs/rspec.rb in phi_attrs-0.2.4 vs lib/phi_attrs/rspec.rb in phi_attrs-0.3.0

- old
+ new

@@ -1,7 +1,9 @@ +# frozen_string_literal: true + require 'rspec/expectations' -DO_NOT_SPECIFY = "do not specify `allowed_by` or `with_access_reason` for negated `allow_phi_access`" +DO_NOT_SPECIFY = 'do not specify `allowed_by` or `with_access_reason` for negated `allow_phi_access`' RSpec::Matchers.define :allow_phi_access do match do |result| @allowed = result.phi_allowed? @user_id_matches = @user_id.nil? || @user_id == result.phi_allowed_by