mleung-koujou 0.0.6 → 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,4 +1,4 @@
1
- = koujou
1
+ = Koujou
2
2
 
3
3
  * http://github.com/mleung/koujou
4
4
 
@@ -11,7 +11,7 @@ require 'koujou/validation_reflection'
11
11
  require 'koujou/custom_validation'
12
12
 
13
13
  module Koujou
14
- VERSION = '0.0.6'
14
+ VERSION = '0.0.7'
15
15
  end
16
16
 
17
17
  if ENV["RAILS_ENV"] == "test"
@@ -43,9 +43,9 @@ module Koujou #:nodoc:
43
43
 
44
44
  set_required_attributes!(instance, attributes)
45
45
  set_unique_attributes!(instance, attributes)
46
- set_confirmation_attributes!(instance, attributes)
47
46
  set_length_validated_attributes!(instance, attributes)
48
47
  set_inclusion_validated_attributes!(instance, attributes)
48
+ set_confirmation_attributes!(instance, attributes)
49
49
  create_associations(instance, recursed_from_model)
50
50
  CustomValidation.stub_custom_validations!(instance)
51
51
 
@@ -101,4 +101,4 @@ module Koujou #:nodoc:
101
101
  end
102
102
 
103
103
  end
104
- end
104
+ end
@@ -41,6 +41,11 @@ class TestBuilder < Test::Unit::TestCase
41
41
  assert_not_nil u.password_confirmation
42
42
  end
43
43
 
44
+ should 'have the same value for password_confirmation as password' do
45
+ u = User.koujou
46
+ assert_equal u.password, u.password_confirmation
47
+ end
48
+
44
49
  should 'allow me to override the model attributes' do
45
50
  namae = 'One Factory to Rule them all'
46
51
  p = Post.koujou(true, :name => namae)
@@ -23,7 +23,7 @@ class TestDataGenerator < Test::Unit::TestCase
23
23
  end
24
24
 
25
25
  should 'generate a valid string' do
26
- @validation.expects(:name).times(1..10).returns('name')
26
+ @validation.expects(:name).at_least_once.returns('name')
27
27
  string = Koujou::DataGenerator.new(false, @validation).generate_data_for_column_type
28
28
  assert_kind_of String, string
29
29
  assert string.size > 0
@@ -51,7 +51,6 @@ class TestDataGenerator < Test::Unit::TestCase
51
51
  @validation.expects(:name).twice.returns('terms_of_service')
52
52
  assert Koujou::DataGenerator.new(false, @validation).generate_data_for_column_type
53
53
  end
54
-
55
54
  end
56
55
 
57
56
  context 'on generate with a required length' do
@@ -92,4 +91,4 @@ class TestDataGenerator < Test::Unit::TestCase
92
91
 
93
92
  end
94
93
 
95
- end
94
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mleung-koujou
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Leung