changed spec to use stubs instead of mock expectations
added attribute conditions