Replace rspec macro by shared_context and shared_examples