diff options
Diffstat (limited to 'spec/requests/blog_posts_spec.rb')
-rw-r--r-- | spec/requests/blog_posts_spec.rb | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/spec/requests/blog_posts_spec.rb b/spec/requests/blog_posts_spec.rb index e7ab573..8695d9a 100644 --- a/spec/requests/blog_posts_spec.rb +++ b/spec/requests/blog_posts_spec.rb @@ -1,22 +1,22 @@ require "spec_helper" -describe "blog" do - login_refinery_user - - it "displays the blog rss feed" do - get blog_rss_feed_path - response.should be_success - response.content_type.should eq("application/rss+xml") +describe "blog posts" do + before(:each) do + Factory.create(:refinery_user) end - - describe "posts" do - let!(:blog_post) { Factory(:blog_post, :title => "Refinery CMS blog post") } - - context "has blog posts" do - it "Displays blog post" do - visit blog_post_path(blog_post) - page.should have_content("Refinery CMS blog post") - end + + context "when has blog posts" do + let(:blog_post) { Factory(:blog_post, :title => "Refinery CMS blog post") } + + it "should display blog post" do + visit blog_post_path(blog_post) + page.should have_content("Refinery CMS blog post") + end + + it "should display the blog rss feed" do + get blog_rss_feed_path + response.should be_success + response.content_type.should eq("application/rss+xml") end end end |