> It looks like the main issue is you are attempting to learn merb through
> updating someone elses code
I forgot to mention that fixturing in two passes seems to work:
def Post.fix(name, *tag_names)
p = fixture(name)
p.save
tag_names.each do |tag_name|
p.tags << Tag.fixture(tag_name)
end
return p
end
describe Post do
it 'should rank affinity' do
post_1 = Post.fix(:Joan_Crawford_Has_Risen, :progressive, :rock, :music)
post_2 = Post.fix(:We_Jammin, :roots, :reggae, :music)
post_3 = Post.fix(:Sardonicus, :progressive, :reggae, :music)
end
end
So that looks like stuff we can bottle up and re-use in many specs...
> and more specifically, trying to write
> tests for code you do not understand.
It's just a danged blog!! C:
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"merb" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [email protected]
For more options, visit this group at http://groups.google.com/group/merb?hl=en
-~----------~----~----~----~------~----~------~--~---