rspec_more 0.3.1 → 0.3.1.1
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.
- data/CHANGELOG +1 -0
- data/lib/rspec_more/data_mapper.rb +10 -1
- data/rspec_more.gemspec +8 -8
- metadata +42 -20
data/CHANGELOG
CHANGED
@@ -6,7 +6,16 @@ module RspecMore
|
|
6
6
|
object = subject || send(object_name)
|
7
7
|
object.send("#{field}=", nil)
|
8
8
|
object.should_not be_valid
|
9
|
-
|
9
|
+
subject.errors[field.to_sym].should_not be_nil
|
10
|
+
end
|
11
|
+
end
|
12
|
+
def uniqueness_on(field)
|
13
|
+
it "requires #{field} to be unique" do
|
14
|
+
subject.save!
|
15
|
+
object_name = self.send(:described_class).to_s.demodulize.underscore.to_sym
|
16
|
+
another = self.send(:described_class).make object_name, field => subject.send(field)
|
17
|
+
another.should_not be_valid
|
18
|
+
subject.errors[field.to_sym].should_not be_nil
|
10
19
|
end
|
11
20
|
end
|
12
21
|
end
|
data/rspec_more.gemspec
CHANGED
@@ -2,20 +2,20 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = %q{rspec_more}
|
5
|
-
s.version = "0.3.1"
|
5
|
+
s.version = "0.3.1.1"
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
|
8
|
-
s.authors = [
|
9
|
-
s.date = %q{2011-06
|
8
|
+
s.authors = ["Yi Wen"]
|
9
|
+
s.date = %q{2011-07-06}
|
10
10
|
s.description = %q{A Rspec extension for more macros and matchers, etc.}
|
11
11
|
s.email = %q{hayafirst@gmail.com}
|
12
|
-
s.extra_rdoc_files = [
|
13
|
-
s.files = [
|
12
|
+
s.extra_rdoc_files = ["CHANGELOG", "README.md", "lib/rspec_more.rb", "lib/rspec_more/active_record.rb", "lib/rspec_more/data_mapper.rb"]
|
13
|
+
s.files = ["CHANGELOG", "Gemfile", "Gemfile.lock", "Manifest", "README.md", "Rakefile", "lib/rspec_more.rb", "lib/rspec_more/active_record.rb", "lib/rspec_more/data_mapper.rb", "rspec_more.gemspec"]
|
14
14
|
s.homepage = %q{https://github.com/ywen/rspec_more}
|
15
|
-
s.rdoc_options = [
|
16
|
-
s.require_paths = [
|
15
|
+
s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Rspec_more", "--main", "README.md"]
|
16
|
+
s.require_paths = ["lib"]
|
17
17
|
s.rubyforge_project = %q{rspec_more}
|
18
|
-
s.rubygems_version = %q{1.
|
18
|
+
s.rubygems_version = %q{1.4.0}
|
19
19
|
s.summary = %q{A Rspec extension for more macros and matchers, etc.}
|
20
20
|
|
21
21
|
if s.respond_to? :specification_version then
|
metadata
CHANGED
@@ -1,27 +1,38 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: rspec_more
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 81
|
5
5
|
prerelease:
|
6
|
+
segments:
|
7
|
+
- 0
|
8
|
+
- 3
|
9
|
+
- 1
|
10
|
+
- 1
|
11
|
+
version: 0.3.1.1
|
6
12
|
platform: ruby
|
7
|
-
authors:
|
13
|
+
authors:
|
8
14
|
- Yi Wen
|
9
15
|
autorequire:
|
10
16
|
bindir: bin
|
11
17
|
cert_chain: []
|
12
|
-
|
18
|
+
|
19
|
+
date: 2011-07-06 00:00:00 -05:00
|
20
|
+
default_executable:
|
13
21
|
dependencies: []
|
22
|
+
|
14
23
|
description: A Rspec extension for more macros and matchers, etc.
|
15
24
|
email: hayafirst@gmail.com
|
16
25
|
executables: []
|
26
|
+
|
17
27
|
extensions: []
|
18
|
-
|
28
|
+
|
29
|
+
extra_rdoc_files:
|
19
30
|
- CHANGELOG
|
20
31
|
- README.md
|
21
32
|
- lib/rspec_more.rb
|
22
33
|
- lib/rspec_more/active_record.rb
|
23
34
|
- lib/rspec_more/data_mapper.rb
|
24
|
-
files:
|
35
|
+
files:
|
25
36
|
- CHANGELOG
|
26
37
|
- Gemfile
|
27
38
|
- Gemfile.lock
|
@@ -32,34 +43,45 @@ files:
|
|
32
43
|
- lib/rspec_more/active_record.rb
|
33
44
|
- lib/rspec_more/data_mapper.rb
|
34
45
|
- rspec_more.gemspec
|
46
|
+
has_rdoc: true
|
35
47
|
homepage: https://github.com/ywen/rspec_more
|
36
48
|
licenses: []
|
49
|
+
|
37
50
|
post_install_message:
|
38
|
-
rdoc_options:
|
51
|
+
rdoc_options:
|
39
52
|
- --line-numbers
|
40
53
|
- --inline-source
|
41
54
|
- --title
|
42
55
|
- Rspec_more
|
43
56
|
- --main
|
44
57
|
- README.md
|
45
|
-
require_paths:
|
58
|
+
require_paths:
|
46
59
|
- lib
|
47
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
60
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
48
61
|
none: false
|
49
|
-
requirements:
|
50
|
-
- -
|
51
|
-
- !ruby/object:Gem::Version
|
52
|
-
|
53
|
-
|
62
|
+
requirements:
|
63
|
+
- - ">="
|
64
|
+
- !ruby/object:Gem::Version
|
65
|
+
hash: 3
|
66
|
+
segments:
|
67
|
+
- 0
|
68
|
+
version: "0"
|
69
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
54
70
|
none: false
|
55
|
-
requirements:
|
56
|
-
- -
|
57
|
-
- !ruby/object:Gem::Version
|
58
|
-
|
71
|
+
requirements:
|
72
|
+
- - ">="
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
hash: 11
|
75
|
+
segments:
|
76
|
+
- 1
|
77
|
+
- 2
|
78
|
+
version: "1.2"
|
59
79
|
requirements: []
|
80
|
+
|
60
81
|
rubyforge_project: rspec_more
|
61
|
-
rubygems_version: 1.
|
82
|
+
rubygems_version: 1.4.0
|
62
83
|
signing_key:
|
63
84
|
specification_version: 3
|
64
85
|
summary: A Rspec extension for more macros and matchers, etc.
|
65
86
|
test_files: []
|
87
|
+
|