factory_girl_rspec 2.0.0 → 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +5 -4
- data/lib/factory_girl/rspec/{with.rb → dsl.rb} +1 -1
- data/lib/factory_girl/rspec/version.rb +1 -1
- data/lib/factory_girl_rspec.rb +3 -2
- data/spec/factory_girl_rspec_spec.rb +15 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8d0b32cfc8ea3f709914fac9905d4a050667dffc
|
4
|
+
data.tar.gz: cdc2090412a45b50c97374a1e9c57c742e7b8371
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 67b8641e89054fc9105e678b200790b766eb965382d9f86b2a7e94c53b6eba35775b5138c6d80075898978ba8ee782db6b81882213fb4549d9e3b06f49800e85
|
7
|
+
data.tar.gz: 118d43fb95fce49070ab6dea005c87c3653b97a5935a209d79b5c806deb787597ffb2e562d841bc5ac96186ddc0ed2aae7162cf4708ae661082c6ee52fd834d2
|
data/README.md
CHANGED
@@ -2,6 +2,11 @@
|
|
2
2
|
|
3
3
|
Integrate FactoryGirl fixture initialization into the RSpec DSL.
|
4
4
|
|
5
|
+
## Features
|
6
|
+
* clean and concise DSL for instantiating FactoryGirl fixtures
|
7
|
+
* easily configure factory variations with FactoryGirl traits or optional parameter hash
|
8
|
+
* [includes FactoryGirl DSL into main Rspec context to DRY up creation](https://github.com/thoughtbot/factory_girl/blob/master/GETTING_STARTED.md#using-factories)
|
9
|
+
|
5
10
|
## Usage
|
6
11
|
|
7
12
|
Basic usage:
|
@@ -38,10 +43,6 @@ describe User do
|
|
38
43
|
end
|
39
44
|
```
|
40
45
|
|
41
|
-
## Features
|
42
|
-
* clean and concise DSL for instantiating FactoryGirl fixtures
|
43
|
-
* easily configure deviations in fixtures with optional parameter hash
|
44
|
-
|
45
46
|
## Installation
|
46
47
|
|
47
48
|
```ruby
|
data/lib/factory_girl_rspec.rb
CHANGED
@@ -44,4 +44,19 @@ describe FactoryGirl::Rspec do
|
|
44
44
|
end
|
45
45
|
end
|
46
46
|
end
|
47
|
+
|
48
|
+
describe FactoryGirl::Syntax::Methods do
|
49
|
+
context 'create' do
|
50
|
+
it 'is available without FactoryGirl prefix' do
|
51
|
+
user = create :user
|
52
|
+
expect(user).to_not be_nil
|
53
|
+
end
|
54
|
+
end
|
55
|
+
context 'build' do
|
56
|
+
it 'is available without FactoryGirl prefix' do
|
57
|
+
user = build :user
|
58
|
+
expect(user).to_not be_nil
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
47
62
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: factory_girl_rspec
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryan Sonnek
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-10-
|
11
|
+
date: 2013-10-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|
@@ -70,8 +70,8 @@ files:
|
|
70
70
|
- README.md
|
71
71
|
- Rakefile
|
72
72
|
- factory_girl_rspec.gemspec
|
73
|
+
- lib/factory_girl/rspec/dsl.rb
|
73
74
|
- lib/factory_girl/rspec/version.rb
|
74
|
-
- lib/factory_girl/rspec/with.rb
|
75
75
|
- lib/factory_girl_rspec.rb
|
76
76
|
- spec/factories/users.rb
|
77
77
|
- spec/factory_girl_rspec_spec.rb
|