rspec tests for cipher finished