Re-factors the rspec tests and adds one broken one for images.