spec/support/data.rb in amoeba-0.0.2 vs spec/support/data.rb in amoeba-0.1.0
- old
+ new
@@ -4,10 +4,12 @@
t = Topic.create(:title => "Ponies", :description => "Lets talk about my ponies.")
# First Post {{{
p1 = t.posts.create(:author => u1, :title => "My little pony", :contents => "Lorum ipsum dolor rainbow bright. I like dogs, dogs are awesome.")
f1 = p1.create_post_config(:is_visible => true, :is_open => false, :password => 'abcdefg123')
+a1 = p1.create_account(:title => "Foo")
+h1 = p1.account.create_history(:some_stuff => "Bar")
c1 = p1.comments.create(:contents => "I love it!")
c1.ratings.create(:num_stars => 5)
c1.ratings.create(:num_stars => 5)
c1.ratings.create(:num_stars => 4)
c1.ratings.create(:num_stars => 3)
@@ -20,11 +22,11 @@
c2.ratings.create(:num_stars => 4)
c2.ratings.create(:num_stars => 1)
c2.ratings.create(:num_stars => 1)
c2.ratings.create(:num_stars => 2)
-c3 = p1.comments.create(:contents => "zomg kthxbbq!!11!!!1!eleven!!")
+c3 = p1.comments.create(:contents => "kthxbbq!!11!!!1!eleven!!")
c3.ratings.create(:num_stars => 0)
c3.ratings.create(:num_stars => 0)
c3.ratings.create(:num_stars => 1)
c3.ratings.create(:num_stars => 2)
c3.ratings.create(:num_stars => 1)
@@ -36,6 +38,14 @@
p1.tags << t1
p1.tags << t2
p1.tags << t3
p1.save
+
+c1 = Category.create(:title => "Umbrellas", :description => "Clown fart")
+c2 = Category.create(:title => "Widgets", :description => "Humpty dumpty")
+c3 = Category.create(:title => "Wombats", :description => "Slushy mushy")
+
+Supercat.create(:post => p1, :category => c1, :ramblings => "zomg")
+Supercat.create(:post => p1, :category => c2, :ramblings => "why")
+Supercat.create(:post => p1, :category => c3, :ramblings => "ohnoes")
# }}}