Practically speaking, in this case there isn't really much of a difference.
Since we're using `User.new`, and User doesn't do anything weird once it's
instantiated, there's not a significant cost to this. On the other hand,
there's a sort of emotional comfort to knowing you've isolated your test
from the user model and tightly bounded the way that it interacts with it.
I don't feel strongly about it one way or another, so I'll defer to your
judgement on this one.


On Mon, Sep 23, 2013 at 10:04 AM, Joshua J Wilborn <notifications@github.com
> wrote:

> In spec/models/board_spec.rb:
>
> > +describe Board do
> > +  let(:board) do
> > +    Board.create!(
> > +      {:name => 'test name',
> > +       :description => 'test desc',
> > +       :project_id => 1
> > +      }
> > +    )
> > +  end
> > +
> > +  let(:user) { User.new }
> > +
> > +  describe "#visible?" do
> > +    it "returns true if the user is allowed to view messages on the project" do
> > +      User.stub(:current).and_return(user)
> > +      user.stub(:allowed_to?).and_return(true)
>
> Just curious, why is a double preferred over a stub here? Thanks!
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/mockdeep/better/pull/17/files#r6520447>
> .
>