Skip to content

Instantly share code, notes, and snippets.

@jwoertink
Created April 8, 2014 18:28
Show Gist options
  • Select an option

  • Save jwoertink/10167669 to your computer and use it in GitHub Desktop.

Select an option

Save jwoertink/10167669 to your computer and use it in GitHub Desktop.
describe Event::Connection do
describe 'after create', :focus do
it 'creates a new life cycle connection' do
org = create(:organization)
evt = create(:event)
connection = evt.connections.build connectable: org
LifeCycle::Connection.stub(:after_create).and_return(nil)
connection.save
LifeCycle::Connection.should have_receieved(:after_create)
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment