I have a spec like the following:
describe 'toggle_approval' do
before(:each) do
@comment = Comment.make(id: 55, approved: false)
end
it "toggles the visibility of the discussion" do
post :toggle_approval, id: 55
#@comment.reload
@comment.approved.should be_true
end
end
This spec will fail unless I uncomment the line that reloads the comment. Why is rails not reloading this for me?
letinstead.letin rspec 1