Mercurial > hg > soundsoftware-site
view vendor/plugins/gravatar/spec/.svn/text-base/gravatar_spec.rb.svn-base @ 0:513646585e45
* Import Redmine trunk SVN rev 3859
author | Chris Cannam |
---|---|
date | Fri, 23 Jul 2010 15:52:44 +0100 |
parents | |
children | 40f7cfd4df19 |
line wrap: on
line source
require 'rubygems' require 'erb' # to get "h" require 'active_support' # to get "returning" require File.dirname(__FILE__) + '/../lib/gravatar' include GravatarHelper, GravatarHelper::PublicMethods, ERB::Util context "gravatar_url with a custom default URL" do setup 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 @url.should match(/&default=no_avatar.png/) end teardown do DEFAULT_OPTIONS.merge!(@original_options) end end context "gravatar_url with default settings" do setup do @url = gravatar_url("somewhere") end specify "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 @url.should_not match(/&default=/) end end