Created
March 29, 2012 23:26
-
-
Save ryanb/2244869 to your computer and use it in GitHub Desktop.
Revisions
-
ryanb revised this gist
Mar 29, 2012 . 3 changed files with 3 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -2,7 +2,7 @@ let(:user) { User.create! name: "John" } let(:comment) { user.comments.create! } it "delegates to user's name" do comment.name.should eq(user.name) end end This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -7,7 +7,7 @@ def comment @comment ||= user.comments.create! end it "delegates to user's name" do comment.name.should eq(user.name) end end This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -2,7 +2,7 @@ def user; @user ||= User.create! name: "John"; end def comment; @comment ||= user.comments.create!; end it "delegates to user's name" do comment.name.should eq(user.name) end end -
ryanb created this gist
Mar 29, 2012 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,8 @@ desc "A user's comment" do let(:user) { User.create! name: "John" } let(:comment) { user.comments.create! } it "delegates user's name" do comment.name.should eq(user.name) end end This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,13 @@ desc "A user's comment" do def user @user ||= User.create! name: "John" end def comment @comment ||= user.comments.create! end it "delegates user's name" do comment.name.should eq(user.name) end end This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,8 @@ desc "A user's comment" do def user; @user ||= User.create! name: "John"; end def comment; @comment ||= user.comments.create!; end it "delegates user's name" do comment.name.should eq(user.name) end end