ciuchcia 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/ciuchcia.rb +1 -1
- data/spec/ciuchcia_spec.rb +11 -0
- metadata +2 -2
data/lib/ciuchcia.rb
CHANGED
data/spec/ciuchcia_spec.rb
CHANGED
@@ -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
|
+
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-
|
12
|
+
date: 2008-09-16 00:00:00 +02:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|