protokoll 0.1.3 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -9,11 +9,19 @@ class ProtokollTest < ActiveSupport::TestCase
9
9
  Protocol.protokoll.count = 0
10
10
  end
11
11
 
12
- test "first using # should get 1" do
13
- Protocol.protokoll.pattern = "#"
12
+ test "using new number_symbol with default pattern should get 20110900001" do
13
+ Protocol.protokoll.number_symbol = "$"
14
+ Protocol.protokoll.pattern = "%Y%m$$$$$"
15
+
16
+ protocol1 = Protocol.create
17
+ assert_equal "20110900001", protocol1.number
18
+ end
14
19
 
15
- protocol = Protocol.create
16
- assert_equal "1", protocol.number
20
+ test "first using # should get 1" do
21
+ Protocol.protokoll.pattern = "#"
22
+
23
+ protocol = Protocol.create
24
+ assert_equal "1", protocol.number
17
25
  end
18
26
 
19
27
  test "second protocol on DB should have number should equals 2" do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: protokoll
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.2.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-10-29 00:00:00.000000000Z
12
+ date: 2011-09-28 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
16
- requirement: &70286020323560 !ruby/object:Gem::Requirement
16
+ requirement: &70167893317420 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 3.1.0
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70286020323560
24
+ version_requirements: *70167893317420
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: sqlite3
27
- requirement: &70286020353580 !ruby/object:Gem::Requirement
27
+ requirement: &70167893347460 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,9 @@ dependencies:
32
32
  version: '0'
33
33
  type: :development
34
34
  prerelease: false
35
- version_requirements: *70286020353580
36
- description: ! 'Rails gem to enable creation of autoincrement Time based string on
37
- a model defined by a pattern. Ex: :pattern => ''P%y###'' produces: ''P2011001'',
38
- ''P2011002''...'
35
+ version_requirements: *70167893347460
36
+ description: Rails 3 gem to enable creation of a custom autoincrement Time based string
37
+ on a model defined by a pattern.
39
38
  email:
40
39
  - celsodantas@gmail.com
41
40
  executables: []
@@ -116,7 +115,8 @@ rubyforge_project:
116
115
  rubygems_version: 1.8.10
117
116
  signing_key:
118
117
  specification_version: 3
119
- summary: A simple Rails gem to create custom autoincrement values to a database column
118
+ summary: A simple Rails gem to create custom autoincrement Time base values to a database
119
+ column
120
120
  test_files:
121
121
  - test/dummy/app/assets/javascripts/application.js
122
122
  - test/dummy/app/assets/stylesheets/application.css