aboutsummaryrefslogtreecommitdiffstats
path: root/spec/requests
diff options
context:
space:
mode:
authorUģis Ozols <ugis.ozolss@gmail.com>2011-07-29 14:17:30 +0300
committerUģis Ozols <ugis.ozolss@gmail.com>2011-07-29 14:17:30 +0300
commit0f3be1a0b43c54e11aed5c787cc113ecbba83329 (patch)
treef8f753196aeaf50cbc85b30a58f8772cd37ec192 /spec/requests
parent6e2046f4b969d0b50a0bfcd240c28e1749105c3b (diff)
downloadrefinerycms-blog-0f3be1a0b43c54e11aed5c787cc113ecbba83329.tar.gz
refinerycms-blog-0f3be1a0b43c54e11aed5c787cc113ecbba83329.tar.bz2
refinerycms-blog-0f3be1a0b43c54e11aed5c787cc113ecbba83329.zip
DB isn't cleared from previous test data. For now clear it ourselves but as feature todo - fix it.
Diffstat (limited to 'spec/requests')
-rw-r--r--spec/requests/blog_categories_spec.rb6
-rw-r--r--spec/requests/blog_posts_spec.rb6
2 files changed, 10 insertions, 2 deletions
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