jelly_bird 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
data/Readme.md CHANGED
@@ -36,6 +36,22 @@ to generate object in test just use `.gen` like this `Dummy.gen` to get generate
36
36
  other_dummy = Dummy.gen(:name => "dummy name")
37
37
  # other_dummy[:name] => "dummy name"
38
38
 
39
+ # custom factories
40
+ you can define custom factories, and generate object using `.generate` mwthod with factory name like this.
41
+
42
+ Mummy.define {{
43
+ :left => /\w{3,10}/.gen,
44
+ :right => /\w{3,10}/.gen
45
+ }}
46
+
47
+ Mummy.define(:custom) {{
48
+ :center => /\w{3,10}/.gen
49
+ }}
50
+
51
+ mummy = Mummy.generate(:custom, :mumble => true)
52
+
53
+ in fact `.gen` is just calling generate with `:default` symbol.
54
+
39
55
  # integration with rspec
40
56
 
41
57
  touch a file with defines like `factories.rb` in spec folder and then require it inside of your `spec_helper.rb`. Then define all the factories like this.
data/jelly_bird.gemspec CHANGED
@@ -17,4 +17,5 @@ Gem::Specification.new do |s|
17
17
  s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
18
18
  s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
19
19
  s.require_paths = ["lib"]
20
+ s.add_dependency('randexp', '>= 0.1.5')
20
21
  end
@@ -1,3 +1,3 @@
1
1
  module JellyBird
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jelly_bird
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
4
+ hash: 21
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 4
10
- version: 0.0.4
9
+ - 5
10
+ version: 0.0.5
11
11
  platform: ruby
12
12
  authors:
13
13
  - JO
@@ -15,9 +15,25 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-07-16 00:00:00 Z
19
- dependencies: []
20
-
18
+ date: 2011-08-12 00:00:00 +01:00
19
+ default_executable:
20
+ dependencies:
21
+ - !ruby/object:Gem::Dependency
22
+ name: randexp
23
+ prerelease: false
24
+ requirement: &id001 !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ">="
28
+ - !ruby/object:Gem::Version
29
+ hash: 17
30
+ segments:
31
+ - 0
32
+ - 1
33
+ - 5
34
+ version: 0.1.5
35
+ type: :runtime
36
+ version_requirements: *id001
21
37
  description: JellyBird is a ultra small factory to help generating objects for purpose of tests.
22
38
  email:
23
39
  - jakub.oboza@gmail.com
@@ -42,6 +58,7 @@ files:
42
58
  - spec/jelly_bird/custom_builders_spec.rb
43
59
  - spec/jelly_bird/jelly_bird_spec.rb
44
60
  - spec/spec_helper.rb
61
+ has_rdoc: true
45
62
  homepage: ""
46
63
  licenses: []
47
64
 
@@ -71,7 +88,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
71
88
  requirements: []
72
89
 
73
90
  rubyforge_project: jelly_bird
74
- rubygems_version: 1.8.3
91
+ rubygems_version: 1.6.2
75
92
  signing_key:
76
93
  specification_version: 3
77
94
  summary: Ultra small gem for generating objects