RSpec 3 compatibility

RSpec 3 compatibility added and tested with RSpec 2/3.