Mercurial > hg > soundsoftware-site
diff vendor/plugins/gravatar/spec/.svn/text-base/gravatar_spec.rb.svn-base @ 22:40f7cfd4df19
* Update to SVN trunk rev 4173
author | Chris Cannam <chris.cannam@soundsoftware.ac.uk> |
---|---|
date | Fri, 24 Sep 2010 14:06:04 +0100 |
parents | 513646585e45 |
children |
line wrap: on
line diff
--- a/vendor/plugins/gravatar/spec/.svn/text-base/gravatar_spec.rb.svn-base Wed Aug 25 16:30:24 2010 +0100 +++ b/vendor/plugins/gravatar/spec/.svn/text-base/gravatar_spec.rb.svn-base Fri Sep 24 14:06:04 2010 +0100 @@ -4,34 +4,40 @@ require File.dirname(__FILE__) + '/../lib/gravatar' include GravatarHelper, GravatarHelper::PublicMethods, ERB::Util -context "gravatar_url with a custom default URL" do - setup do +describe "gravatar_url with a custom default URL" do + before(:each) do @original_options = DEFAULT_OPTIONS.dup DEFAULT_OPTIONS[:default] = "no_avatar.png" @url = gravatar_url("somewhere") end - specify "should include the \"default\" argument in the result" do + it "should include the \"default\" argument in the result" do @url.should match(/&default=no_avatar.png/) end - teardown do + after(:each) do DEFAULT_OPTIONS.merge!(@original_options) end end -context "gravatar_url with default settings" do - setup do +describe "gravatar_url with default settings" do + before(:each) do @url = gravatar_url("somewhere") end - specify "should have a nil default URL" do + it "should have a nil default URL" do DEFAULT_OPTIONS[:default].should be_nil end - specify "should not include the \"default\" argument in the result" do + it "should not include the \"default\" argument in the result" do @url.should_not match(/&default=/) end -end \ No newline at end of file +end + +describe "gravatar with a custom title option" do + it "should include the title in the result" do + gravatar('example@example.com', :title => "This is a title attribute").should match(/This is a title attribute/) + end +end