Skip to content
This repository has been archived by the owner on Nov 17, 2018. It is now read-only.

Commit

Permalink
Fixed issue with specs no running the same each time.
Browse files Browse the repository at this point in the history
  • Loading branch information
chrislloyd committed Jun 10, 2008
1 parent 5ea9968 commit 77f0aea
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 3 deletions.
26 changes: 26 additions & 0 deletions bugs/issue-73e515a7e0a68ba0e284d36b0342f46cda88c1ba.yaml
@@ -0,0 +1,26 @@
--- !ditz.rubyforge.org,2008-03-06/issue
title: Spec failures for Gravtastic::Model#gravatar_url
desc: The ordering of the params sometimes causes spec errors. It needs to be defined.
type: :bugfix
component: Gravtastic
release: 1.1.2
reporter: Chris Lloyd <christopher.lloyd@gmail.com>
status: :closed
disposition: :fixed
creation_time: 2008-06-10 12:35:44.485608 Z
references: []

id: 73e515a7e0a68ba0e284d36b0342f46cda88c1ba
log_events:
- - 2008-06-10 12:35:45.741808 Z
- Chris Lloyd <christopher.lloyd@gmail.com>
- created
- ""
- - 2008-06-10 12:41:44.913679 Z
- Chris Lloyd <christopher.lloyd@gmail.com>
- assigned to release 1.1.2 from unassigned
- ""
- - 2008-06-10 12:42:24.074042 Z
- Chris Lloyd <christopher.lloyd@gmail.com>
- closed issue with disposition fixed
- ""
9 changes: 9 additions & 0 deletions bugs/project.yaml
Expand Up @@ -55,3 +55,12 @@ releases:
- |-
Nice, fully working publicly available gem! Sweet.
Gravtastic now matches all the specs on http://en.gravatar.com/site/implement/url
- !ditz.rubyforge.org,2008-03-06/release
name: 1.1.2
status: :unreleased
release_time:
log_events:
- - 2008-06-10 12:35:55.678243 Z
- Chris Lloyd <christopher.lloyd@gmail.com>
- created
- ""
2 changes: 1 addition & 1 deletion lib/gravtastic.rb
Expand Up @@ -52,7 +52,7 @@ def parse_url_options_hash(options)
'?' + options.map do |pair|
pair[0] = pair[0].to_s[0,1] # Get the first character of the option
pair.map{|item| item = CGI::escape(item.to_s) }.join('=') # Join key & value together
end.join('&') # Join options together
end.sort.join('&') # Join options together
else
''
end
Expand Down
4 changes: 2 additions & 2 deletions spec/gravtastic_spec.rb
Expand Up @@ -114,7 +114,7 @@
end

it "parses a size" do
@user.gravatar_url(:size => 512).should == valid_gravatar_url + '?s=512&r=PG'
@user.gravatar_url(:size => 512).should == valid_gravatar_url + '?r=PG&s=512'
end

it "parses a rating" do
Expand All @@ -134,7 +134,7 @@
end

it "parses multiple options" do
@user.gravatar_url(:size => 20, :rating => 'R18', :default => :monsterid).should == valid_gravatar_url + '?d=monsterid&s=20&r=R18'
@user.gravatar_url(:size => 20, :rating => 'R18', :default => :monsterid).should == valid_gravatar_url + '?d=monsterid&r=R18&s=20'
end

it "defaults to a 'PG' rating" do
Expand Down

0 comments on commit 77f0aea

Please sign in to comment.