miniskirt 0.9 → 0.9.1
Sign up to get free protection for your applications and to get access to all the features.
- data/miniskirt.rb +1 -1
- data/miniskirt_test.rb +9 -9
- metadata +2 -2
data/miniskirt.rb
CHANGED
data/miniskirt_test.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'miniskirt'
|
2
2
|
require 'test/unit'
|
3
3
|
|
4
|
-
class
|
4
|
+
class MiniskirtTest < Test::Unit::TestCase
|
5
5
|
def test_should_define_factories
|
6
6
|
factories = Miniskirt.class_variable_get :@@factories
|
7
7
|
assert_not_nil factories["user"]
|
@@ -89,6 +89,14 @@ class Mock
|
|
89
89
|
end
|
90
90
|
end
|
91
91
|
|
92
|
+
class User < Mock
|
93
|
+
attr_accessor :login, :email, :password, :password_confirmation
|
94
|
+
end
|
95
|
+
|
96
|
+
class Post < Mock
|
97
|
+
attr_accessor :user
|
98
|
+
end
|
99
|
+
|
92
100
|
Miniskirt.define :user do |f|
|
93
101
|
f.login "johndoe%d"
|
94
102
|
f.email "%{login}@example.com"
|
@@ -98,11 +106,3 @@ end
|
|
98
106
|
Miniskirt.define :post do |f|
|
99
107
|
f.user { Miniskirt :user }
|
100
108
|
end
|
101
|
-
|
102
|
-
class User < Mock
|
103
|
-
attr_accessor :login, :email, :password, :password_confirmation
|
104
|
-
end
|
105
|
-
|
106
|
-
class Post < Mock
|
107
|
-
attr_accessor :user
|
108
|
-
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: miniskirt
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 0.9.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stephen Celis
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2010-
|
12
|
+
date: 2010-02-11 00:00:00 -06:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|