```ruby
let(:env) do
  Rack::MockRequest.env_for(@uri).tap { |e| e['HTTP_ACCEPT] = @media_type }
end
```