Rubocop fix and RSpec 3.0 compatibility fixes