factory_girl_rspec 0.0.2 → 1.0.0.beta
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.ruby-gemset +1 -0
- data/.ruby-version +1 -0
- data/README.md +7 -1
- data/lib/factory_girl/rspec/version.rb +1 -1
- data/lib/factory_girl/rspec/with.rb +6 -2
- metadata +24 -25
- data/.rvmrc +0 -1
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 0fff20136a0d5622ed6a172db47b1d4b389997f9
|
4
|
+
data.tar.gz: c39902c233bc622a3de61ecb1bb2c2da25ea88f3
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: b050bb1edb646188710d538bafc7e2529335c279d7ff8433f3f2a3d6dd437e2b34f9b3338e0e991d8ef8176d7d898ef50bb67b92607b1b898cd64445e6dd39bd
|
7
|
+
data.tar.gz: 51e1a08dba6329f7666897c444837fcd6b14eb6eaadca8214064b520c16b49e4dcf45d55049fd8564765304f904e06cef755bd0f997e9e73622fc23e37620092
|
data/.ruby-gemset
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
factory_girl_rspec
|
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
ruby-2.0.0-p247
|
data/README.md
CHANGED
@@ -29,6 +29,12 @@ describe User do
|
|
29
29
|
it { user.should be_inactive }
|
30
30
|
it { user.should_not be_happy }
|
31
31
|
end
|
32
|
+
|
33
|
+
context 'when user is inactive' do
|
34
|
+
# instantiate FactoryGirl :user fixture with custom traits
|
35
|
+
with :user, :when_inactive
|
36
|
+
it { user.should be_inactive }
|
37
|
+
end
|
32
38
|
end
|
33
39
|
```
|
34
40
|
|
@@ -44,7 +50,7 @@ gem 'factory_girl_rspec'
|
|
44
50
|
```
|
45
51
|
|
46
52
|
## Contributing
|
47
|
-
|
53
|
+
|
48
54
|
* Fork the project
|
49
55
|
* Fix the issue
|
50
56
|
* Add unit tests
|
@@ -3,8 +3,12 @@ require 'factory_girl'
|
|
3
3
|
module FactoryGirl
|
4
4
|
module Rspec
|
5
5
|
module With
|
6
|
-
def with(name,
|
7
|
-
let(name) { ::FactoryGirl.create(name,
|
6
|
+
def with(name, *args)
|
7
|
+
let(name) { ::FactoryGirl.create(name, *args) }
|
8
|
+
end
|
9
|
+
|
10
|
+
def with!(name, *args)
|
11
|
+
let!(name) { ::FactoryGirl.create(name, *args) }
|
8
12
|
end
|
9
13
|
end
|
10
14
|
end
|
metadata
CHANGED
@@ -1,38 +1,43 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: factory_girl_rspec
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
5
|
-
prerelease:
|
4
|
+
version: 1.0.0.beta
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Ryan Sonnek
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
11
|
+
date: 2013-09-03 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: rspec
|
16
|
-
requirement:
|
17
|
-
none: false
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
18
16
|
requirements:
|
19
|
-
- -
|
17
|
+
- - '>='
|
20
18
|
- !ruby/object:Gem::Version
|
21
19
|
version: '2.0'
|
22
20
|
type: :runtime
|
23
21
|
prerelease: false
|
24
|
-
version_requirements:
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - '>='
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '2.0'
|
25
27
|
- !ruby/object:Gem::Dependency
|
26
28
|
name: factory_girl
|
27
|
-
requirement:
|
28
|
-
none: false
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
29
30
|
requirements:
|
30
|
-
- -
|
31
|
+
- - '>='
|
31
32
|
- !ruby/object:Gem::Version
|
32
33
|
version: '2.0'
|
33
34
|
type: :runtime
|
34
35
|
prerelease: false
|
35
|
-
version_requirements:
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - '>='
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '2.0'
|
36
41
|
description: add helper methods to quickly instantiate and assign factory girl fixtures
|
37
42
|
to your test context
|
38
43
|
email:
|
@@ -42,7 +47,8 @@ extensions: []
|
|
42
47
|
extra_rdoc_files: []
|
43
48
|
files:
|
44
49
|
- .gitignore
|
45
|
-
- .
|
50
|
+
- .ruby-gemset
|
51
|
+
- .ruby-version
|
46
52
|
- CONTRIBUTORS.txt
|
47
53
|
- Gemfile
|
48
54
|
- LICENSE.txt
|
@@ -54,32 +60,25 @@ files:
|
|
54
60
|
- lib/factory_girl_rspec.rb
|
55
61
|
homepage: ''
|
56
62
|
licenses: []
|
63
|
+
metadata: {}
|
57
64
|
post_install_message:
|
58
65
|
rdoc_options: []
|
59
66
|
require_paths:
|
60
67
|
- lib
|
61
68
|
required_ruby_version: !ruby/object:Gem::Requirement
|
62
|
-
none: false
|
63
69
|
requirements:
|
64
|
-
- -
|
70
|
+
- - '>='
|
65
71
|
- !ruby/object:Gem::Version
|
66
72
|
version: '0'
|
67
|
-
segments:
|
68
|
-
- 0
|
69
|
-
hash: -4568117578116489416
|
70
73
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
71
|
-
none: false
|
72
74
|
requirements:
|
73
|
-
- -
|
75
|
+
- - '>'
|
74
76
|
- !ruby/object:Gem::Version
|
75
|
-
version:
|
76
|
-
segments:
|
77
|
-
- 0
|
78
|
-
hash: -4568117578116489416
|
77
|
+
version: 1.3.1
|
79
78
|
requirements: []
|
80
79
|
rubyforge_project: factory_girl_rspec
|
81
|
-
rubygems_version:
|
80
|
+
rubygems_version: 2.0.6
|
82
81
|
signing_key:
|
83
|
-
specification_version:
|
82
|
+
specification_version: 4
|
84
83
|
summary: integrate factory_girl directly into the RSpec DSL
|
85
84
|
test_files: []
|
data/.rvmrc
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
rvm use ruby-1.9.3@factory_girl_rspec --create
|