ciuchcia 0.0.4 → 0.0.5

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.
Files changed (3) hide show
  1. data/lib/ciuchcia.rb +1 -1
  2. data/spec/ciuchcia_spec.rb +11 -0
  3. metadata +2 -2
data/lib/ciuchcia.rb CHANGED
@@ -7,7 +7,7 @@ unless defined? Ciuchcia
7
7
  module Ciuchcia
8
8
 
9
9
  # :stopdoc:
10
- VERSION = '0.0.4'
10
+ VERSION = '0.0.5'
11
11
  LIBPATH = ::File.expand_path(::File.dirname(__FILE__)) + ::File::SEPARATOR
12
12
  PATH = ::File.dirname(LIBPATH) + ::File::SEPARATOR
13
13
  # :startdoc:
@@ -2,6 +2,12 @@
2
2
 
3
3
  require File.join(File.dirname(__FILE__), %w[spec_helper])
4
4
 
5
+ class TestView
6
+ include ActionView::Helpers::DateHelper
7
+ end
8
+
9
+ test_view = TestView.new
10
+
5
11
  describe Ciuchcia do
6
12
  it "should correctly tralnlate numbers to words" do
7
13
  number_in_words(1).should eql("jeden")
@@ -19,6 +25,11 @@ describe Ciuchcia do
19
25
  money_in_words(2401).should eql("dwa tysiące czterysta jeden złotych")
20
26
  end
21
27
 
28
+ it "should tell distance in time po kurwa polsku" do
29
+ test_view.distance_of_time_in_words(Time.now - 60,Time.now).should eql("1 minuta")
30
+ test_view.distance_of_time_in_words(Time.now - 3600*2,Time.now).should eql("około 2 godziny")
31
+ end
32
+
22
33
  it "should correctly validates NIP number" do
23
34
  Ciuchcia::Validations.valid_nip?('779-21-25-257').should be_true
24
35
  Ciuchcia::Validations.valid_nip?('779-21-25-254').should be_false
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ciuchcia
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - "Kacper Cie\xC5\x9Bla"
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-09-15 00:00:00 +02:00
12
+ date: 2008-09-16 00:00:00 +02:00
13
13
  default_executable:
14
14
  dependencies: []
15
15