brdata 2.1.6 → 2.1.7

Sign up to get free protection for your applications and to get access to all the features.
@@ -39,3 +39,9 @@ class Date
39
39
  end
40
40
 
41
41
  end
42
+
43
+ class NilClass
44
+ def to_s_br
45
+ ""
46
+ end
47
+ end
@@ -2,7 +2,7 @@ module BrData
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 2
4
4
  MINOR = 1
5
- TINY = 6
5
+ TINY = 7
6
6
 
7
7
  STRING = "#{MAJOR}.#{MINOR}.#{TINY}"
8
8
  end
data/test/date_test.rb CHANGED
@@ -26,6 +26,11 @@ class DateTest < Test::Unit::TestCase
26
26
  assert_equal "13/12/2007", "13/12/2007".to_date.to_s_br
27
27
  end
28
28
 
29
+ #to_s_br when date is nil
30
+ def test_date_to_s_br_when_date_is_nil
31
+ assert_equal "", nil.to_s_br
32
+ end
33
+
29
34
  #valid?
30
35
  def test_valid_when_date_format_is_traditional_and_valid_format_and_valid_civil
31
36
  assert Date.valid?("2007/01/02"), "Should be a valid date"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: brdata
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.6
4
+ version: 2.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - "Marcos Tapaj\xC3\xB3s"
@@ -12,7 +12,7 @@ autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
14
 
15
- date: 2009-03-06 00:00:00 -03:00
15
+ date: 2009-04-14 00:00:00 -03:00
16
16
  default_executable:
17
17
  dependencies:
18
18
  - !ruby/object:Gem::Dependency