fix attr matcher which does not fail when the attribute was not found or has a wrong value
convert spec syntax to be compatible with rspec3