Skip to content

Commit 5e692bf

Browse files
committed
number_of_guitars is now age in the test rails app
1 parent 7d6b930 commit 5e692bf

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

spec/support/rails_template.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
# Generate some test models
99
generate :model, "post title:string body:text published_at:datetime author_id:integer category_id:integer"
1010
inject_into_file 'app/models/post.rb', " belongs_to :author, :class_name => 'User'\n belongs_to :category\n accepts_nested_attributes_for :author\n", :after => "class Post < ActiveRecord::Base\n"
11-
generate :model, "user type:string first_name:string last_name:string username:string number_of_guitars:integer"
11+
generate :model, "user type:string first_name:string last_name:string username:string age:integer"
1212
inject_into_file 'app/models/user.rb', " has_many :posts, :foreign_key => 'author_id'\n", :after => "class User < ActiveRecord::Base\n"
1313
generate :model, "publisher --migration=false --parent=User"
1414
generate :model, 'category name:string description:text'

spec/support/rails_template_with_data.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
User.create! :first_name => first,
1414
:last_name => last,
1515
:username => [first,last].join('-').downcase,
16-
:number_of_guitars => rand(20)
16+
:age => rand(80)
1717
end
1818
1919
categories = ["Rock", "Pop Rock", "Alt-Country", "Blues", "Dub-Step"].collect do |name|

0 commit comments

Comments
 (0)