jay_z 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
data/lib/jay_z/blueprint.rb
CHANGED
data/lib/jay_z/version.rb
CHANGED
@@ -49,9 +49,9 @@ describe JayZ::Blueprint do
|
|
49
49
|
end
|
50
50
|
end
|
51
51
|
|
52
|
-
describe ".
|
52
|
+
describe ".define" do
|
53
53
|
before do
|
54
|
-
JayZ::Comment.
|
54
|
+
JayZ::Comment.define(:admin) do
|
55
55
|
user { JayZ::User.make(:name => 'Anders Admin').new }
|
56
56
|
end
|
57
57
|
end
|
@@ -79,17 +79,17 @@ describe JayZ::Blueprint do
|
|
79
79
|
user { User.make(:name => 'Anders Default').new }
|
80
80
|
body { 'I am defined in default' }
|
81
81
|
end
|
82
|
-
JayZ::Comment.
|
82
|
+
JayZ::Comment.define(:spam) do
|
83
83
|
user { User.make(:name => 'Anders Spam').new }
|
84
84
|
end
|
85
85
|
end
|
86
86
|
|
87
|
-
describe "when .
|
87
|
+
describe "when .define(:spam) has not defined the method in its block" do
|
88
88
|
it "returns the body defined in the default block" do
|
89
89
|
JayZ::Comment.spam[:body].must_equal 'I am defined in default'
|
90
90
|
end
|
91
91
|
end
|
92
|
-
describe "when .
|
92
|
+
describe "when .define(:spam) has defined the method in its block" do
|
93
93
|
it "returns the value from the spam block" do
|
94
94
|
JayZ::Comment.spam[:user].name.must_equal 'Anders Spam'
|
95
95
|
end
|
@@ -101,7 +101,7 @@ describe JayZ::Blueprint do
|
|
101
101
|
JayZ::User.default do
|
102
102
|
name { "User #{sn}" }
|
103
103
|
end
|
104
|
-
JayZ::User.
|
104
|
+
JayZ::User.define(:admin) do
|
105
105
|
name { "Admin #{sn}" }
|
106
106
|
end
|
107
107
|
end
|
data/spec/jay_z_spec.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jay_z
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -13,7 +13,7 @@ date: 2011-10-07 00:00:00.000000000Z
|
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activerecord
|
16
|
-
requirement: &
|
16
|
+
requirement: &70286611593460 !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: :development
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70286611593460
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: railties
|
27
|
-
requirement: &
|
27
|
+
requirement: &70286611592500 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ~>
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: 3.1.0
|
33
33
|
type: :development
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *70286611592500
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: sqlite3
|
38
|
-
requirement: &
|
38
|
+
requirement: &70286611591800 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ~>
|
@@ -43,7 +43,7 @@ dependencies:
|
|
43
43
|
version: 1.3.4
|
44
44
|
type: :development
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *70286611591800
|
47
47
|
description: A model factory. Say no to fixtures.
|
48
48
|
email:
|
49
49
|
- anders.tornqvist@gmail.com
|