dm-rspec 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.markdown CHANGED
@@ -1,3 +1,10 @@
1
+ ### version 0.1.1 / 2011-09-12
2
+
3
+ * New matcher: validate\_presence\_of
4
+ * New matcher: validate\_uniqueness\_of
5
+ * New matcher: validate\_format\_of
6
+
7
+
1
8
  ### version 0.1.0 / 2011-09-04
2
9
 
3
10
  * New matcher: have many through
data/Gemfile CHANGED
@@ -17,4 +17,7 @@ group :development do
17
17
  gem 'libnotify' if RUBY_PLATFORM =~ /linux/
18
18
  gem 'ruby-debug19' if RUBY_VERSION =~ /^1\.9/
19
19
  gem 'ruby-debug' if RUBY_VERSION =~ /^1\.8/
20
+
21
+ gem 'dm-migrations'
22
+ gem 'dm-sqlite-adapter'
20
23
  end
data/Gemfile.lock CHANGED
@@ -4,25 +4,33 @@ GEM
4
4
  addressable (2.2.6)
5
5
  archive-tar-minitar (0.5.2)
6
6
  columnize (0.3.4)
7
+ data_objects (0.10.6)
8
+ addressable (~> 2.1)
7
9
  diff-lcs (1.1.3)
8
- dm-core (1.0.2)
9
- addressable (~> 2.2)
10
- extlib (~> 0.9.15)
11
- dm-validations (1.0.2)
12
- dm-core (~> 1.0.2)
13
- extlib (0.9.15)
14
- ffi (1.0.9)
10
+ dm-core (1.1.0)
11
+ addressable (~> 2.2.4)
12
+ dm-do-adapter (1.1.0)
13
+ data_objects (~> 0.10.2)
14
+ dm-core (~> 1.1.0)
15
+ dm-migrations (1.1.0)
16
+ dm-core (~> 1.1.0)
17
+ dm-sqlite-adapter (1.1.0)
18
+ dm-do-adapter (~> 1.1.0)
19
+ do_sqlite3 (~> 0.10.2)
20
+ dm-validations (1.1.0)
21
+ dm-core (~> 1.1.0)
22
+ do_sqlite3 (0.10.6)
23
+ data_objects (= 0.10.6)
15
24
  git (1.2.5)
16
- guard (0.5.1)
25
+ guard (0.6.3)
17
26
  thor (~> 0.14.6)
18
- guard-rspec (0.4.0)
27
+ guard-rspec (0.4.5)
19
28
  guard (>= 0.4.0)
20
29
  jeweler (1.6.4)
21
30
  bundler (~> 1.0)
22
31
  git (>= 1.2.5)
23
32
  rake
24
33
  libnotify (0.5.7)
25
- ffi (= 1.0.9)
26
34
  linecache19 (0.5.12)
27
35
  ruby_core_source (>= 0.1.4)
28
36
  rake (0.9.2)
@@ -47,14 +55,14 @@ GEM
47
55
  columnize (>= 0.3.1)
48
56
  linecache19 (>= 0.5.11)
49
57
  ruby-debug-base19 (>= 0.11.19)
50
- ruby2ruby (1.2.5)
58
+ ruby2ruby (1.3.0)
51
59
  ruby_parser (~> 2.0)
52
60
  sexp_processor (~> 3.0)
53
61
  ruby_core_source (0.1.5)
54
62
  archive-tar-minitar (>= 0.5.2)
55
- ruby_parser (2.2.0)
63
+ ruby_parser (2.3.0)
56
64
  sexp_processor (~> 3.0)
57
- sexp_processor (3.0.5)
65
+ sexp_processor (3.0.6)
58
66
  thor (0.14.6)
59
67
 
60
68
  PLATFORMS
@@ -63,6 +71,8 @@ PLATFORMS
63
71
  DEPENDENCIES
64
72
  bundler (~> 1.0.0)
65
73
  dm-core
74
+ dm-migrations
75
+ dm-sqlite-adapter
66
76
  dm-validations
67
77
  guard-rspec
68
78
  jeweler (~> 1.6.4)
data/README.markdown CHANGED
@@ -25,8 +25,11 @@ In your spec files you can use the next matchers:
25
25
  * have\_many
26
26
  * have\_many\_and\_belong\_to
27
27
  * have\_property
28
- * have(n).errors_on(:property)
29
- * have_many(:association).trough(:another_association)
28
+ * have(n).errors\_on(:property)
29
+ * have\_many(:association).trough(:another\_association)
30
+ * validate\_presence\_of(:property)
31
+ * validate\_uniqueness\_of(:property)
32
+ * validate\_format\_of(:property).with(/regexp/)
30
33
 
31
34
 
32
35
  ## Examples
@@ -63,6 +66,8 @@ You specs can contain the next:
63
66
  specify {Genre.should have_many_and_belong_to :books}
64
67
  specify {Books.should have_many_and_belong_to :genres}
65
68
 
69
+ specify {Books.should validates_presence_of :name}
70
+
66
71
  it 'has errors' do
67
72
  book = Book.new(:name => 'fails on two validations')
68
73
  book.valid?
@@ -70,6 +75,7 @@ You specs can contain the next:
70
75
  end
71
76
 
72
77
 
78
+
73
79
  ## TODO
74
80
 
75
81
  Implement the next matchers:
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.0
1
+ 0.1.1
@@ -0,0 +1,40 @@
1
+ module DataMapper
2
+ module Matchers
3
+ def validate_format_of(property)
4
+ ValidateFormatOf.new(property)
5
+ end
6
+
7
+ class ValidateFormatOf < ValidationMatcher
8
+ set_validation_subject "format"
9
+
10
+ def with(format)
11
+ @format = format
12
+ self
13
+ end
14
+
15
+ def matches?(model)
16
+ validators = model.validators.contexts[:default]
17
+ format_of = validators.find do |validator|
18
+ validator.is_a? DataMapper::Validations::FormatValidator and validator.field_name == @property
19
+ end
20
+ return false unless format_of
21
+ return false unless format_of.options[:with] == @format
22
+ return false if @msg and @msg != format_of.options[:message]
23
+ true
24
+ end
25
+
26
+ def failure_message
27
+ msg = "expected to validate #{@validation_subject} of #{@property} with #{@format.inspect}"
28
+ msg = %Q'#{msg} and message "#{@msg}"' if @msg
29
+ msg
30
+ end
31
+
32
+ def negative_failure_message
33
+ msg = "expected to not validate #{@validation_subject} of #{@property} with #{@format.inspect}"
34
+ msg = %Q'#{msg} and message "#{@msg}"' if @msg
35
+ msg
36
+ end
37
+ end
38
+
39
+ end
40
+ end
@@ -0,0 +1,27 @@
1
+ module DataMapper
2
+ module Matchers
3
+ def validate_presence_of(property)
4
+ ValidatePresenceOf.new(property)
5
+ end
6
+
7
+ class ValidatePresenceOf < ValidationMatcher
8
+ set_validation_subject "presence"
9
+ set_default_msg_reg /must not be blank$/
10
+
11
+
12
+ def matches?(model)
13
+ [nil, ''].each do |val|
14
+ obj = model.new(@property => val)
15
+ return false if obj.valid?
16
+ if messages = obj.errors.send(:errors)[@property]
17
+ return false unless messages.find{|msg| msg =~ @msg_reg}
18
+ else
19
+ return false
20
+ end
21
+ end
22
+ true
23
+ end
24
+ end
25
+
26
+ end
27
+ end
@@ -0,0 +1,23 @@
1
+ module DataMapper
2
+ module Matchers
3
+ def validate_uniqueness_of(property)
4
+ ValidateUniquenessOf.new(property)
5
+ end
6
+
7
+ class ValidateUniquenessOf < ValidationMatcher
8
+ set_validation_subject "uniqueness"
9
+ set_default_msg_reg /is already taken$/
10
+
11
+ def matches?(klass)
12
+ val = rand.to_s
13
+ klass.create!(@property => val)
14
+ model = klass.new(@property => val)
15
+ model.valid?
16
+ errors = model.errors.send(:errors)
17
+ errors = errors[@property.to_sym]
18
+ errors and errors.find {|msg| msg =~ @msg_reg}
19
+ end
20
+ end
21
+
22
+ end
23
+ end
@@ -0,0 +1,47 @@
1
+ module DataMapper
2
+ module Matchers
3
+ class ValidationMatcher
4
+
5
+ class << self
6
+ def set_validation_subject(subject)
7
+ @validation_subject = subject
8
+ end
9
+
10
+ def set_default_msg_reg(msg_reg)
11
+ @default_msg_reg = msg_reg
12
+ end
13
+ end
14
+
15
+
16
+
17
+ def initialize(property)
18
+ @property = property.to_sym
19
+ @validation_subject = self.class.instance_eval { @validation_subject }
20
+ @msg_reg = self.class.instance_eval { @default_msg_reg }
21
+ end
22
+
23
+ def with_message(msg)
24
+ @msg = msg
25
+ @msg_reg = /^#{Regexp.escape(@msg)}$/
26
+ self
27
+ end
28
+
29
+ def failure_message
30
+ msg = "expected to validate #{@validation_subject} of #{@property}"
31
+ msg = %Q'#{msg} with message "#{@msg}"' if @msg
32
+ msg
33
+ end
34
+
35
+ def negative_failure_message
36
+ msg = "expected to not validate #{@validation_subject} of #{@property}"
37
+ msg = %Q'#{msg} with message "#{@msg}"' if @msg
38
+ msg
39
+ end
40
+
41
+ def description
42
+ "validates #{@validation_subject} of #{@property}"
43
+ end
44
+
45
+ end
46
+ end
47
+ end
data/lib/dm/matchers.rb CHANGED
@@ -6,6 +6,13 @@ end
6
6
 
7
7
  require 'dm/matchers/belong_to'
8
8
  require 'dm/matchers/have_many'
9
- require 'dm/matchers/have_property'
10
9
  require 'dm/matchers/have_many_and_belong_to'
11
10
  require 'dm/matchers/have_many_through'
11
+
12
+ require 'dm/matchers/have_property'
13
+
14
+ require 'dm/matchers/validation_matcher'
15
+
16
+ require 'dm/matchers/validate_presence_of'
17
+ require 'dm/matchers/validate_uniqueness_of'
18
+ require 'dm/matchers/validate_format_of'
@@ -8,15 +8,15 @@ describe DataMapper::Matchers::HaveManyAndBelongTo do
8
8
  end
9
9
 
10
10
  it 'fails if association does not exist' do
11
- lambda { Book.should have_many_and_belong_to :authors}.should
12
- fail_with "expected to have many and belong to authors"
11
+ lambda { Book.should have_many_and_belong_to :authors}.
12
+ should fail_with "expected to have many and belong to authors"
13
13
  end
14
14
  end
15
15
 
16
16
  context '#should_not' do
17
17
  it 'fails if association exists' do
18
- lambda { Author.should_not have_many_and_belong_to :books}.should
19
- fail_with "expected to not have many and belong to books"
18
+ lambda { Genre.should_not have_many_and_belong_to :books}.
19
+ should fail_with "expected to not have many and belong to books"
20
20
  end
21
21
  end
22
22
  end
@@ -0,0 +1,50 @@
1
+ require 'spec_helper'
2
+
3
+ describe 'validate_format_of' do
4
+
5
+ context 'without message' do
6
+ context '#should 'do
7
+ it 'passes if validatation exists' do
8
+ lambda { Tag.should validate_format_of(:name).with(/\w+/) }.should_pass
9
+ end
10
+
11
+ it 'fails if validation does not exist' do
12
+ lambda { Tag.should validate_format_of(:id).with(/\w+/) }.
13
+ should fail_with 'expected to validate format of id with /\w+/'
14
+ end
15
+ end
16
+
17
+ context '#should_not' do
18
+ it 'fails if validation exists' do
19
+ lambda { Tag.should_not validate_format_of(:name).with(/\w+/) }.
20
+ should fail_with 'expected to not validate format of name with /\w+/'
21
+ end
22
+ end
23
+ end
24
+
25
+
26
+
27
+ context 'with message' do
28
+ context '#should' do
29
+ it 'passes if messages are the same' do
30
+ lambda{ Genre.should validate_format_of(:name).with(/\w+/).
31
+ with_message('Bad format of genre')
32
+ }.should_pass
33
+ end
34
+
35
+ it 'fails if messages are different' do
36
+ lambda{ Genre.should validate_format_of(:name).with(/\w+/).
37
+ with_message('Different message')
38
+ }.should fail_with 'expected to validate format of name with /\w+/ and message "Different message"'
39
+ end
40
+ end
41
+
42
+ context '#should_not' do
43
+ it 'fails if validation message exists and it is the same' do
44
+ lambda{ Genre.should_not validate_format_of(:name).with(/\w+/).
45
+ with_message('Bad format of genre')
46
+ }.should fail_with 'expected to not validate format of name with /\w+/ and message "Bad format of genre"'
47
+ end
48
+ end
49
+ end
50
+ end
@@ -0,0 +1,63 @@
1
+ require 'spec_helper'
2
+
3
+
4
+ describe 'validate_presence_of' do
5
+ # Create class for the test
6
+ before(:all) do
7
+ @human = Class.new do
8
+ include DataMapper::Resource
9
+ property :first_name, String
10
+ property :last_name , String
11
+ property :age , Integer
12
+
13
+ validates_presence_of :first_name, :message => 'Where is the first name?'
14
+ validates_presence_of :last_name
15
+ end
16
+ end
17
+
18
+
19
+ context "without message" do
20
+ context '#should' do
21
+ it 'passes if validation exists' do
22
+ lambda{ @human.should validate_presence_of :last_name}.should_pass
23
+ end
24
+
25
+ it 'fails if validation does not exist' do
26
+ lambda{ @human.should validate_presence_of :age}.
27
+ should fail_with "expected to validate presence of age"
28
+ end
29
+ end
30
+
31
+ context '#should_not' do
32
+ it 'fails if validation exists' do
33
+ lambda{ @human.should_not validate_presence_of :last_name}.
34
+ should fail_with "expected to not validate presence of last_name"
35
+ end
36
+ end
37
+ end
38
+
39
+
40
+ context 'with message' do
41
+ context '#should' do
42
+ it 'passes if messages are the same' do
43
+ lambda{ @human.should validate_presence_of(:first_name).
44
+ with_message('Where is the first name?')
45
+ }.should_pass
46
+ end
47
+
48
+ it 'fails if messages are different' do
49
+ lambda{ @human.should validate_presence_of(:first_name).
50
+ with_message('Different message')
51
+ }.should fail_with 'expected to validate presence of first_name with message "Different message"'
52
+ end
53
+ end
54
+
55
+ context '#should_not' do
56
+ it 'fails if validation message exists' do
57
+ lambda{ @human.should_not validate_presence_of(:first_name).
58
+ with_message('Where is the first name?')
59
+ }.should fail_with 'expected to not validate presence of first_name with message "Where is the first name?"'
60
+ end
61
+ end
62
+ end
63
+ end
@@ -0,0 +1,50 @@
1
+ require 'spec_helper'
2
+
3
+ describe 'validate_uniqueness_of' do
4
+
5
+ context 'without message' do
6
+ context '#should 'do
7
+ it 'passes if validatation exists' do
8
+ lambda { Author.should validate_uniqueness_of :last_name}.should_pass
9
+ end
10
+
11
+ it 'fails if validation does not exist' do
12
+ lambda { Author.should validate_uniqueness_of :first_name}.
13
+ should fail_with "expected to validate uniqueness of first_name"
14
+ end
15
+ end
16
+
17
+ context '#should_not' do
18
+ it 'fails if validation exists' do
19
+ lambda { Author.should_not validate_uniqueness_of :last_name}.
20
+ should fail_with "expected to not validate uniqueness of last_name"
21
+ end
22
+ end
23
+ end
24
+
25
+
26
+
27
+ context 'with message' do
28
+ context '#should' do
29
+ it 'passes if messages are the same' do
30
+ lambda{ Genre.should validate_uniqueness_of(:name).
31
+ with_message('Genre name must be unique!')
32
+ }.should_pass
33
+ end
34
+
35
+ it 'fails if messages are different' do
36
+ lambda{ Genre.should validate_uniqueness_of(:name).
37
+ with_message('Different message')
38
+ }.should fail_with 'expected to validate uniqueness of name with message "Different message"'
39
+ end
40
+ end
41
+
42
+ context '#should_not' do
43
+ it 'fails if validation message exists and it is the same' do
44
+ lambda{ Genre.should_not validate_uniqueness_of(:name).
45
+ with_message('Genre name must be unique!')
46
+ }.should fail_with 'expected to not validate uniqueness of name with message "Genre name must be unique!"'
47
+ end
48
+ end
49
+ end
50
+ end
data/spec/spec_helper.rb CHANGED
@@ -3,9 +3,14 @@ $LOAD_PATH.unshift(File.dirname(__FILE__))
3
3
  require 'rspec'
4
4
  require 'dm-core'
5
5
  require 'dm-validations'
6
+ require 'dm-migrations'
7
+ require 'dm-sqlite-adapter'
6
8
 
7
9
  require 'dm-rspec'
8
10
 
11
+
12
+ DataMapper.setup(:default, "sqlite3::memory:")
13
+
9
14
  # Requires supporting files with custom matchers and macros, etc,
10
15
  # in ./support/ and its subdirectories.
11
16
  Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}
@@ -34,6 +39,8 @@ class Proc
34
39
  end
35
40
 
36
41
 
42
+
43
+
37
44
  # Models for testing
38
45
  #
39
46
  class Book
@@ -45,13 +52,17 @@ class Book
45
52
  has n, :taggings
46
53
  has n, :tags, :through => :taggings
47
54
  validates_presence_of :name
55
+ validates_uniqueness_of :name, :message => 'Book name must be unique!'
48
56
  validates_length_of :name, :min => 10
49
57
  end
50
58
 
51
59
  class Author
52
60
  include DataMapper::Resource
53
61
  property :id, Serial
62
+ property :first_name, String
63
+ property :last_name, String
54
64
  has n, :books
65
+ validates_uniqueness_of :last_name
55
66
  end
56
67
 
57
68
  class Genre
@@ -59,6 +70,8 @@ class Genre
59
70
  property :id, Serial
60
71
  property :name, String
61
72
  has n, :books, :through => Resource
73
+ validates_uniqueness_of :name, :message => 'Genre name must be unique!'
74
+ validates_format_of :name, :with => /\w+/, :message => "Bad format of genre"
62
75
  end
63
76
 
64
77
  class Tag
@@ -66,10 +79,17 @@ class Tag
66
79
  property :id, Serial
67
80
  has n, :taggings
68
81
  has n, :books, :through => :taggings
82
+ property :name, String
83
+ validates_format_of :name, :with => /\w+/
69
84
  end
70
85
 
71
86
  class Tagging
72
87
  include DataMapper::Resource
88
+ property :id, Serial
73
89
  belongs_to :tag
74
90
  belongs_to :book
75
91
  end
92
+
93
+
94
+ DataMapper.finalize
95
+ DataMapper.auto_migrate!
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dm-rspec
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,12 +9,12 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-09-06 00:00:00.000000000 +03:00
12
+ date: 2011-09-12 00:00:00.000000000 +03:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: dm-core
17
- requirement: &18252280 !ruby/object:Gem::Requirement
17
+ requirement: &15883760 !ruby/object:Gem::Requirement
18
18
  none: false
19
19
  requirements:
20
20
  - - ! '>='
@@ -22,10 +22,10 @@ dependencies:
22
22
  version: '0'
23
23
  type: :runtime
24
24
  prerelease: false
25
- version_requirements: *18252280
25
+ version_requirements: *15883760
26
26
  - !ruby/object:Gem::Dependency
27
27
  name: dm-validations
28
- requirement: &18251800 !ruby/object:Gem::Requirement
28
+ requirement: &15883280 !ruby/object:Gem::Requirement
29
29
  none: false
30
30
  requirements:
31
31
  - - ! '>='
@@ -33,10 +33,10 @@ dependencies:
33
33
  version: '0'
34
34
  type: :runtime
35
35
  prerelease: false
36
- version_requirements: *18251800
36
+ version_requirements: *15883280
37
37
  - !ruby/object:Gem::Dependency
38
38
  name: rspec
39
- requirement: &18251320 !ruby/object:Gem::Requirement
39
+ requirement: &15882800 !ruby/object:Gem::Requirement
40
40
  none: false
41
41
  requirements:
42
42
  - - ~>
@@ -44,10 +44,10 @@ dependencies:
44
44
  version: 2.3.0
45
45
  type: :development
46
46
  prerelease: false
47
- version_requirements: *18251320
47
+ version_requirements: *15882800
48
48
  - !ruby/object:Gem::Dependency
49
49
  name: bundler
50
- requirement: &18250840 !ruby/object:Gem::Requirement
50
+ requirement: &15882320 !ruby/object:Gem::Requirement
51
51
  none: false
52
52
  requirements:
53
53
  - - ~>
@@ -55,10 +55,10 @@ dependencies:
55
55
  version: 1.0.0
56
56
  type: :development
57
57
  prerelease: false
58
- version_requirements: *18250840
58
+ version_requirements: *15882320
59
59
  - !ruby/object:Gem::Dependency
60
60
  name: jeweler
61
- requirement: &18250360 !ruby/object:Gem::Requirement
61
+ requirement: &15881840 !ruby/object:Gem::Requirement
62
62
  none: false
63
63
  requirements:
64
64
  - - ~>
@@ -66,10 +66,10 @@ dependencies:
66
66
  version: 1.6.4
67
67
  type: :development
68
68
  prerelease: false
69
- version_requirements: *18250360
69
+ version_requirements: *15881840
70
70
  - !ruby/object:Gem::Dependency
71
71
  name: rcov
72
- requirement: &18249880 !ruby/object:Gem::Requirement
72
+ requirement: &15881360 !ruby/object:Gem::Requirement
73
73
  none: false
74
74
  requirements:
75
75
  - - ! '>='
@@ -77,10 +77,10 @@ dependencies:
77
77
  version: '0'
78
78
  type: :development
79
79
  prerelease: false
80
- version_requirements: *18249880
80
+ version_requirements: *15881360
81
81
  - !ruby/object:Gem::Dependency
82
82
  name: reek
83
- requirement: &18249400 !ruby/object:Gem::Requirement
83
+ requirement: &15880880 !ruby/object:Gem::Requirement
84
84
  none: false
85
85
  requirements:
86
86
  - - ~>
@@ -88,10 +88,10 @@ dependencies:
88
88
  version: 1.2.8
89
89
  type: :development
90
90
  prerelease: false
91
- version_requirements: *18249400
91
+ version_requirements: *15880880
92
92
  - !ruby/object:Gem::Dependency
93
93
  name: guard-rspec
94
- requirement: &18248920 !ruby/object:Gem::Requirement
94
+ requirement: &15880400 !ruby/object:Gem::Requirement
95
95
  none: false
96
96
  requirements:
97
97
  - - ! '>='
@@ -99,10 +99,10 @@ dependencies:
99
99
  version: '0'
100
100
  type: :development
101
101
  prerelease: false
102
- version_requirements: *18248920
102
+ version_requirements: *15880400
103
103
  - !ruby/object:Gem::Dependency
104
104
  name: libnotify
105
- requirement: &18248440 !ruby/object:Gem::Requirement
105
+ requirement: &15879920 !ruby/object:Gem::Requirement
106
106
  none: false
107
107
  requirements:
108
108
  - - ! '>='
@@ -110,10 +110,10 @@ dependencies:
110
110
  version: '0'
111
111
  type: :development
112
112
  prerelease: false
113
- version_requirements: *18248440
113
+ version_requirements: *15879920
114
114
  - !ruby/object:Gem::Dependency
115
115
  name: ruby-debug19
116
- requirement: &18247960 !ruby/object:Gem::Requirement
116
+ requirement: &15879440 !ruby/object:Gem::Requirement
117
117
  none: false
118
118
  requirements:
119
119
  - - ! '>='
@@ -121,7 +121,29 @@ dependencies:
121
121
  version: '0'
122
122
  type: :development
123
123
  prerelease: false
124
- version_requirements: *18247960
124
+ version_requirements: *15879440
125
+ - !ruby/object:Gem::Dependency
126
+ name: dm-migrations
127
+ requirement: &15878960 !ruby/object:Gem::Requirement
128
+ none: false
129
+ requirements:
130
+ - - ! '>='
131
+ - !ruby/object:Gem::Version
132
+ version: '0'
133
+ type: :development
134
+ prerelease: false
135
+ version_requirements: *15878960
136
+ - !ruby/object:Gem::Dependency
137
+ name: dm-sqlite-adapter
138
+ requirement: &15912980 !ruby/object:Gem::Requirement
139
+ none: false
140
+ requirements:
141
+ - - ! '>='
142
+ - !ruby/object:Gem::Version
143
+ version: '0'
144
+ type: :development
145
+ prerelease: false
146
+ version_requirements: *15912980
125
147
  description: RSpec matchers for DataMapper
126
148
  email: blake131313@gmail.com
127
149
  executables: []
@@ -146,6 +168,10 @@ files:
146
168
  - lib/dm/matchers/have_many_and_belong_to.rb
147
169
  - lib/dm/matchers/have_many_through.rb
148
170
  - lib/dm/matchers/have_property.rb
171
+ - lib/dm/matchers/validate_format_of.rb
172
+ - lib/dm/matchers/validate_presence_of.rb
173
+ - lib/dm/matchers/validate_uniqueness_of.rb
174
+ - lib/dm/matchers/validation_matcher.rb
149
175
  - lib/dm/resource.rb
150
176
  - spec/dm/matchers/belong_to_spec.rb
151
177
  - spec/dm/matchers/errors_on_spec.rb
@@ -153,6 +179,9 @@ files:
153
179
  - spec/dm/matchers/have_many_spec.rb
154
180
  - spec/dm/matchers/have_many_through_spec.rb
155
181
  - spec/dm/matchers/have_property_spec.rb
182
+ - spec/dm/matchers/validate_format_of_spec.rb
183
+ - spec/dm/matchers/validate_presence_of_spec.rb
184
+ - spec/dm/matchers/validate_uniquness_of_spec.rb
156
185
  - spec/spec_helper.rb
157
186
  has_rdoc: true
158
187
  homepage: http://github.com/greyblake/dm-rspec