kisaweb 0.0.7 → 0.0.8

Sign up to get free protection for your applications and to get access to all the features.
data/History.md CHANGED
@@ -1,3 +1,6 @@
1
+ == 0.0.8 / 2009-10-01
2
+ * Don't bomb if Club.find is called with a nil argument
3
+
1
4
  == 0.0.7 / 2009-10-01
2
5
  * Strip all strings from API
3
6
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.7
1
+ 0.0.8
data/kisaweb.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{kisaweb}
8
- s.version = "0.0.7"
8
+ s.version = "0.0.8"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Jarkko Laine"]
data/lib/kisaweb/club.rb CHANGED
@@ -9,7 +9,7 @@ module Kisaweb
9
9
 
10
10
  def self.find(abbr)
11
11
  all.select do |club|
12
- club.abbreviation.to_s.downcase == abbr.downcase
12
+ club.abbreviation.to_s.downcase == abbr.to_s.downcase
13
13
  end.first
14
14
  end
15
15
 
data/spec/club_spec.rb CHANGED
@@ -75,6 +75,16 @@ describe Kisaweb::Club do
75
75
  @club.name.should == "Tampereen Pyrintö"
76
76
  end
77
77
  end
78
+
79
+ context "with nil as attribute" do
80
+ before(:each) do
81
+ @club = Kisaweb::Club.find(nil)
82
+ end
83
+
84
+ it "should return nil but not bomb" do
85
+ @club.should be_nil
86
+ end
87
+ end
78
88
  end
79
89
 
80
90
  describe "attributes" do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kisaweb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jarkko Laine