Or you could just rely on testing against @question.title or
@question.content; thus decoupling your tests from the exact  values.

You could also cache the old title/old_content if you want to ensure that
they are no longer on the page.


On Sun, Sep 1, 2013 at 5:58 PM, Clay Whitley <notifications@github.com>wrote:

> In spec/features/questions_spec.rb:
>
> > @@ -4,11 +4,9 @@
> >    let(:user) { FactoryGirl.create :user }
> >
> >    before do
> > -     user.questions.create(title: "Pizza, Ricotta, Bourbon", content: "Any clue what I can make with these?")
> > +     @question = FactoryGirl.create(:question, title: "Pizza, Ricotta, Bourbon", content: "Any clue what I can make with these?", user: user)
>
> I added the attributes because they are different than the ones we setup
> in our questions factory, and we are later testing for the presence of
> 'Pizza, Ricotta, Bourbon'. I guess I could change the values in our factory
> to mirror what we are testing for.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/purple-martins-2013/snack-overflow/pull/18/files#r6103953>
> .
>