title: Creating an instance double with a stubbed out attr_writer
body: <p>I'm trying to stub out Ruby's <code>Net::HTTP</code>'s <code>use_ssl=</code> attr_writer method. How do I do that?</p>
  
  <pre><code>let(:http) { instance_double("Net::HTTP", use_ssl=: true) }
  </code></pre>
  
  <p>does not work. How do I do this? I want to use an instance double because it preserves actual method arity and makes sure the method exists.</p>
  
  <p>Also what's the best way to stub out this environment variable in a spec?</p>
  
  <pre><code>domain = ENV['SERVICE_HOST']
  </code></pre>