refactor makes captures in user agent pattern available in params[:agent] in agent_condition_spec.rb