Fix attr matcher and rspec syntax

Fix attr matcher which does not fail when the attribute was not found or has a wrong value.
Also updated the spec syntax to be compatible with rspec3 as asked on pull request #8