Displaying 3 results from an estimated 3 matches for "create_comment".
2008 Mar 17
4
RSpec''ing model association callbacks
...d_all_by_user_id(self.id)
comments.each { |c|
c.destroy
}
end
end
----------------- User Spec
describe User, " being deleted" do
before(:each) do
end
it "should see deleted his own comments" do
user = Factory.create_user()
comment_1 = Factory.create_comment(:author =>
user)
comment_2 = Factory.create_comment(:author =>
user)
user.destroy
comment_1.should be nil
comment_2.should be nil
end
end
----------------- Factory Module
def self.create_user(attributes = {})
default_attributes = {
:first_name => "Fo...
2006 Aug 04
2
Newbie Question: fom_tag_remote return HTML
Hi Everyone,
I am still only 1 week old on Rails and I am trying to implement an
AJAXy "Add comment" sheet. On the post for a new comment, I want to
use form_tag_remote. I would like to use a partial that I want to
render for the newly posted comment once the Submit happens. What is
the syntax to say, render a partial once the submit happens?
Thanks,
Vinod
2007 Sep 26
10
How do I best setup data for Story Runner?
Just started looking at the Story Runner integration, and am
converting a few Rails integration tests to get a feel for it.
My integration tests relied on fixtures, and since my models have a
significant amount of validation (and hence need valid data unless I
save without validation), this has made setup easy.
With stories however, I''m wondering what the recommended approach is.