Permalink
Browse files

Organizing specs for our helpers.

  • Loading branch information...
1 parent 41a42d8 commit 8b24d0c75aab20997f262f40dcab108527a369b2 @lunks lunks committed Aug 23, 2012
Showing with 18 additions and 10 deletions.
  1. +18 −10 spec/helpers/content_helper_spec.rb
@@ -5,16 +5,24 @@
content = Content.new({slug: :sidebar_text, text: "Hi, this is dog"}, as: :admin)
Content.should_receive(:from_slug).with(@options).and_return(content)
end
- it "returns a content by slug" do
- helper.content(@options).should == "<p>Hi, this is dog</p>\n"
+
+ context "parsed content" do
+ it "returns a content by slug" do
+ helper.content(@options).should == "<p>Hi, this is dog</p>\n"
+ end
+
+ it "is aliased as c" do
+ helper.c(@options).should == "<p>Hi, this is dog</p>\n"
+ end
end
- it "should have an alias as c" do
- helper.c(@options).should == "<p>Hi, this is dog</p>\n"
- end
- it "returns a raw content by slug" do
- helper.raw_content(@options).should == "Hi, this is dog"
- end
- it "should have an alias as rc" do
- helper.rc(@options).should == "Hi, this is dog"
+
+ context "raw content" do
+ it "returns a raw content by slug" do
+ helper.raw_content(@options).should == "Hi, this is dog"
+ end
+
+ it "is aliased as rc" do
+ helper.rc(@options).should == "Hi, this is dog"
+ end
end
end

0 comments on commit 8b24d0c

Please sign in to comment.