jay_z 0.3.1 → 0.3.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/README.md +24 -18
  2. data/lib/jay_z/version.rb +1 -1
  3. metadata +7 -7
data/README.md CHANGED
@@ -36,25 +36,31 @@ Examples
36
36
  **Rails, ActiveRecord and minitest**
37
37
 
38
38
 
39
- 1. Update Gemfile
39
+ 1. Update Gemfile
40
40
 
41
41
  group :development, :test do
42
42
  gem 'jay_z', :require => 'jay_z/rails'
43
43
  end
44
44
 
45
- 2. `rails generate jay_z:install`
45
+ 2. Install the gem
46
46
 
47
- It adds `blueprint.rb` file to test or spec directory.
47
+ $ bundle install
48
48
 
49
- 3. Update config/application.rb
49
+ 3. Generate (test|spec)/blueprint.rb file
50
+
51
+ $ rails generate jay_z:install
52
+
53
+ 4. Update config/application.rb
50
54
 
51
55
  config.generators do |g|
52
56
  g.test_framework :mini_test, :spec => true, :fixture_replacement => :jay_z
53
57
  end
54
58
 
55
- 4. `rails generate model Comment post_id:integer body:text`
59
+ 5. Generate a model object with its factory
56
60
 
57
- It adds to the end of `(spec|test)/blueprint.rb`
61
+ $ rails generate model Comment post_id:integer body:text
62
+
63
+ 6. It adds to the end of file (test|spec)/blueprint.rb
58
64
 
59
65
  class Comment < Blueprint(ActiveRecord)
60
66
  default do
@@ -63,27 +69,27 @@ Examples
63
69
  end
64
70
  end
65
71
 
66
- 5. Modify the generated blueprint according to your preferences
72
+ 7. Modify the generated blueprint according to your preferences
67
73
 
68
74
  class Comment < Blueprint(ActiveRecord)
69
- default do
70
- post { Post.make.save }
71
- body { "MyText" }
72
- end
75
+ default do
76
+ post { Post.make.save }
77
+ body { "MyText" }
78
+ end
73
79
  end
74
80
 
75
- 6. Write tests in test/comment_test.rb
81
+ 8. Write tests in test/comment_test.rb
76
82
 
77
83
  require "minitest_helper"
78
84
 
79
85
  class CommentTest < MiniTest::Rails::Model
80
- before do
81
- @comment = Comment.make.new
82
- end
86
+ before do
87
+ @comment = Comment.make.new
88
+ end
83
89
 
84
- it "must be valid" do
85
- @comment.valid?.must_equal true
86
- end
90
+ it "must be valid" do
91
+ @comment.valid?.must_equal true
92
+ end
87
93
  end
88
94
 
89
95
 
data/lib/jay_z/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module JayZ
2
- VERSION = "0.3.1"
2
+ VERSION = "0.3.2"
3
3
  end
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.3.1
4
+ version: 0.3.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2011-11-26 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activerecord
16
- requirement: &70259315039420 !ruby/object:Gem::Requirement
16
+ requirement: &70103681451940 !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: *70259315039420
24
+ version_requirements: *70103681451940
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: railties
27
- requirement: &70259314963480 !ruby/object:Gem::Requirement
27
+ requirement: &70103681376360 !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: *70259314963480
35
+ version_requirements: *70103681376360
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: sqlite3
38
- requirement: &70259314958780 !ruby/object:Gem::Requirement
38
+ requirement: &70103681374320 !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: *70259314958780
46
+ version_requirements: *70103681374320
47
47
  description: A model factory. Say no to fixtures.
48
48
  email:
49
49
  - anders.tornqvist@gmail.com