add nil-check
This commit is contained in:
parent
7cf8339b59
commit
f6aae2a01f
2 changed files with 2 additions and 2 deletions
|
|
@ -89,7 +89,7 @@ module DiasporaFederation
|
||||||
attr_accessor :person_class
|
attr_accessor :person_class
|
||||||
|
|
||||||
def person_class=(klass)
|
def person_class=(klass)
|
||||||
@person_class = klass.to_s
|
@person_class = klass.nil? ? nil : klass.to_s
|
||||||
end
|
end
|
||||||
|
|
||||||
def person_class
|
def person_class
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ module DiasporaFederation
|
||||||
temp = DiasporaFederation.person_class
|
temp = DiasporaFederation.person_class
|
||||||
DiasporaFederation.person_class = nil
|
DiasporaFederation.person_class = nil
|
||||||
expect { DiasporaFederation.validate_config }.to raise_error ConfigurationError
|
expect { DiasporaFederation.validate_config }.to raise_error ConfigurationError
|
||||||
DiasporaFederation.person_class = temp.to_s
|
DiasporaFederation.person_class = temp
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue