Displaying 1 result from an estimated 1 matches for "second_name".
Did you mean:
cond_name
2008 Mar 17
4
RSpec''ing model association callbacks
...ser)
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 => "Foo",
:second_name => "Bar",
:user_name => "FooBar",
:email => "foo at bar.com"
}
User.create! default_attributes.merge(attributes)
end
def self.create_comment(attributes = {})
default_attributes = {
:title => "title",
:text...