frequency 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.1
1
+ 0.1.2
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{frequency}
8
- s.version = "0.1.1"
8
+ s.version = "0.1.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["David James"]
@@ -40,7 +40,7 @@ class Frequency
40
40
  }
41
41
 
42
42
  def initialize(string)
43
- self.plain_text = string.downcase
43
+ self.plain_text = string ? string.downcase : ''
44
44
  end
45
45
 
46
46
  def ==(other)
@@ -66,6 +66,16 @@ describe "Frequency" do
66
66
  end
67
67
  end
68
68
 
69
+ describe "nil" do
70
+ before do
71
+ @freq = Frequency.new(nil)
72
+ end
73
+
74
+ it "should be valid" do
75
+ @freq.plain_text.should == ""
76
+ end
77
+ end
78
+
69
79
  describe "sometimes" do
70
80
  before do
71
81
  @freq = Frequency.new("sometimes")
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: frequency
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - David James