diff options
Diffstat (limited to 'spec/helpers/refinery/blog')
-rw-r--r-- | spec/helpers/refinery/blog/controller_helper_spec.rb | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/spec/helpers/refinery/blog/controller_helper_spec.rb b/spec/helpers/refinery/blog/controller_helper_spec.rb new file mode 100644 index 0000000..727e8b4 --- /dev/null +++ b/spec/helpers/refinery/blog/controller_helper_spec.rb @@ -0,0 +1,25 @@ +require 'spec_helper' +module Refinery + module Blog + describe ControllerHelper do + describe "#find_tags" do + let(:tags) { helper.find_tags } + + context "with draft posts" do + let!(:blog_post) { FactoryGirl.create(:blog_post, :draft => true, :tag_list => "first, second" ) } + it "does not return tags" do + tags.should be_empty + end + end + + context "with live posts" do + let!(:blog_post) { FactoryGirl.create(:blog_post, :tag_list => "first, second" ) } + + it "does not return tags" do + tags.should_not be_empty + end + end + end + end + end +end |