Skip to content

Instantly share code, notes, and snippets.

@enricostano
Last active December 20, 2015 05:38
Show Gist options
  • Save enricostano/6079539 to your computer and use it in GitHub Desktop.
Save enricostano/6079539 to your computer and use it in GitHub Desktop.
describe 'conversations/base' do
subject do
Timecop.freeze(10.minutes.ago) { @conversation = FactoryGirl.create(:conversation) }
Timecop.return
@conversation
end
before :each do
assign(:object, subject)
end
it 'expire the conversation when the conversation is updated' do
expect {
subject.update_attribute(:name, 'test')
subject.reload
}.to change(self, :render)
end
end
@enricostano
Copy link
Author

Time now UTC: 2013-07-25 14:20:14 UTC
SPEC inspect: #<Conversation id: 1, project_id: 1, user_id: 1, name: "The Master Plan", created_at: "2013-07-25 14:10:10", updated_at: "2013-07-25 14:10:10">

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment