From 0f3be1a0b43c54e11aed5c787cc113ecbba83329 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?U=C4=A3is=20Ozols?= Date: Fri, 29 Jul 2011 14:17:30 +0300 Subject: DB isn't cleared from previous test data. For now clear it ourselves but as feature todo - fix it. --- spec/requests/blog_categories_spec.rb | 6 +++++- spec/requests/blog_posts_spec.rb | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) (limited to 'spec/requests') diff --git a/spec/requests/blog_categories_spec.rb b/spec/requests/blog_categories_spec.rb index 09dc4ac..d0682b6 100644 --- a/spec/requests/blog_categories_spec.rb +++ b/spec/requests/blog_categories_spec.rb @@ -1,7 +1,11 @@ require "spec_helper" describe "blog categories" do - before(:all) { Factory(:refinery_user) } + before(:all) do + # destroy all existing (if any) users before creating new one + Refinery::User.destroy_all + Factory(:refinery_user) + end before(:each) do @blog_post = Factory(:blog_post, :title => "Refinery CMS blog post") diff --git a/spec/requests/blog_posts_spec.rb b/spec/requests/blog_posts_spec.rb index 43bc93e..284bd07 100644 --- a/spec/requests/blog_posts_spec.rb +++ b/spec/requests/blog_posts_spec.rb @@ -1,7 +1,11 @@ require "spec_helper" describe "blog" do - before(:all) { Factory(:refinery_user) } + before(:all) do + # destroy all existing (if any) users before creating new one + Refinery::User.destroy_all + Factory(:refinery_user) + end it "displays the blog rss feed" do get blog_rss_feed_path -- cgit v1.2.3