Created
August 7, 2009 10:22
-
-
Save anonymous/163826 to your computer and use it in GitHub Desktop.
This file contains 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 characters
context "A user posting to a blog" do | |
setup do | |
@user = Factory(:user) | |
@blog = Factory(:blog) | |
end | |
action do | |
post :create, :user_id => @user.id, :id => @blog.id, :post => {:body => "Blah"} | |
end | |
# the body of this block is actually executed after 'setup' but before 'action' | |
expect "send a notification to Technorati or whatever" do | |
TechnoratiApi.expects(:notify) | |
end | |
should "put the post into the users's posts" do | |
@user.posts.include?("Blah") # or whatever | |
end | |
# etc | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment