extensions isn't initialized, so it could be nil

The BasicSpecification class checks if `@extensions` is empty, but never sets it to anything in the first place. That means it could be nil, and that would cause a `NoMethodError`. (I've run into that error myself while running Bundler tests). This pull checks if `@extensions` is nil or empty to avoid the exception.