Remove deprecated config from rspec

config.treat_symbols_as_metadata_keys_with_true_values = true
Use an output variable to check Runner output

allow_any_instance_of is a problematic feature on rspec (https://www.relishapp.com/rspec/rspec-mocks/v/3-1/docs/working-with-legacy-code/any-instance)
so changed the code so it can be tested on rspec without any change on its behavior
Fix to not output during test