From a9602381efd2122a671112a0bf0ccbff173a8fa9 Mon Sep 17 00:00:00 2001 From: Ken Lu Date: Wed, 12 Jun 2013 09:17:08 -0400 Subject: [PATCH] annoate for test and fixtures --- test/fixtures/books.yml | 14 ++++++++++++++ test/fixtures/config_parameters.yml | 11 +++++++++++ test/fixtures/users.yml | 29 +++++++++++++++++++++++++++++ test/fixtures/votes.yml | 11 +++++++++++ test/unit/book_test.rb | 14 ++++++++++++++ test/unit/config_parameter_test.rb | 11 +++++++++++ test/unit/user_test.rb | 29 +++++++++++++++++++++++++++++ test/unit/vote_test.rb | 11 +++++++++++ 8 files changed, 130 insertions(+) diff --git a/test/fixtures/books.yml b/test/fixtures/books.yml index 11420f4..b285cbe 100644 --- a/test/fixtures/books.yml +++ b/test/fixtures/books.yml @@ -1,3 +1,17 @@ +# == Schema Information +# +# Table name: books +# +# id :integer not null, primary key +# title :string(255) +# author :string(255) +# created_at :datetime not null +# updated_at :datetime not null +# user_id :integer +# votes_count :integer default(0), not null +# asin :string(255) +# + # Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html one: diff --git a/test/fixtures/config_parameters.yml b/test/fixtures/config_parameters.yml index 2eb6df8..de955f6 100644 --- a/test/fixtures/config_parameters.yml +++ b/test/fixtures/config_parameters.yml @@ -1,3 +1,14 @@ +# == Schema Information +# +# Table name: config_parameters +# +# id :integer not null, primary key +# name :string(255) +# value :string(255) +# created_at :datetime not null +# updated_at :datetime not null +# + # Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html one: diff --git a/test/fixtures/users.yml b/test/fixtures/users.yml index e4d7178..7815779 100644 --- a/test/fixtures/users.yml +++ b/test/fixtures/users.yml @@ -1,3 +1,32 @@ +# == Schema Information +# +# Table name: users +# +# id :integer not null, primary key +# first_name :string(255) +# last_name :string(255) +# created_at :datetime not null +# updated_at :datetime not null +# email :string(255) default(""), not null +# encrypted_password :string(255) default(""), not null +# reset_password_token :string(255) +# reset_password_sent_at :datetime +# remember_created_at :datetime +# sign_in_count :integer default(0) +# current_sign_in_at :datetime +# last_sign_in_at :datetime +# current_sign_in_ip :string(255) +# last_sign_in_ip :string(255) +# admin :boolean default(FALSE) +# failed_attempts :integer default(0) +# unlock_token :string(255) +# locked_at :datetime +# confirmation_token :string(255) +# confirmed_at :datetime +# confirmation_sent_at :datetime +# blocked :boolean default(FALSE) +# + # Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html one: diff --git a/test/fixtures/votes.yml b/test/fixtures/votes.yml index 6fbb1d3..047f6b6 100644 --- a/test/fixtures/votes.yml +++ b/test/fixtures/votes.yml @@ -1,3 +1,14 @@ +# == Schema Information +# +# Table name: votes +# +# id :integer not null, primary key +# book_id :integer +# user_id :integer +# created_at :datetime not null +# updated_at :datetime not null +# + # Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html one: diff --git a/test/unit/book_test.rb b/test/unit/book_test.rb index e48079d..20a8b01 100644 --- a/test/unit/book_test.rb +++ b/test/unit/book_test.rb @@ -1,3 +1,17 @@ +# == Schema Information +# +# Table name: books +# +# id :integer not null, primary key +# title :string(255) +# author :string(255) +# created_at :datetime not null +# updated_at :datetime not null +# user_id :integer +# votes_count :integer default(0), not null +# asin :string(255) +# + require 'test_helper' class BookTest < ActiveSupport::TestCase diff --git a/test/unit/config_parameter_test.rb b/test/unit/config_parameter_test.rb index e61bae6..7b5bd7b 100644 --- a/test/unit/config_parameter_test.rb +++ b/test/unit/config_parameter_test.rb @@ -1,3 +1,14 @@ +# == Schema Information +# +# Table name: config_parameters +# +# id :integer not null, primary key +# name :string(255) +# value :string(255) +# created_at :datetime not null +# updated_at :datetime not null +# + require 'test_helper' class ConfigParameterTest < ActiveSupport::TestCase diff --git a/test/unit/user_test.rb b/test/unit/user_test.rb index 82f61e0..fc2bc81 100644 --- a/test/unit/user_test.rb +++ b/test/unit/user_test.rb @@ -1,3 +1,32 @@ +# == Schema Information +# +# Table name: users +# +# id :integer not null, primary key +# first_name :string(255) +# last_name :string(255) +# created_at :datetime not null +# updated_at :datetime not null +# email :string(255) default(""), not null +# encrypted_password :string(255) default(""), not null +# reset_password_token :string(255) +# reset_password_sent_at :datetime +# remember_created_at :datetime +# sign_in_count :integer default(0) +# current_sign_in_at :datetime +# last_sign_in_at :datetime +# current_sign_in_ip :string(255) +# last_sign_in_ip :string(255) +# admin :boolean default(FALSE) +# failed_attempts :integer default(0) +# unlock_token :string(255) +# locked_at :datetime +# confirmation_token :string(255) +# confirmed_at :datetime +# confirmation_sent_at :datetime +# blocked :boolean default(FALSE) +# + require 'test_helper' class UserTest < ActiveSupport::TestCase diff --git a/test/unit/vote_test.rb b/test/unit/vote_test.rb index f31f992..d9d5bed 100644 --- a/test/unit/vote_test.rb +++ b/test/unit/vote_test.rb @@ -1,3 +1,14 @@ +# == Schema Information +# +# Table name: votes +# +# id :integer not null, primary key +# book_id :integer +# user_id :integer +# created_at :datetime not null +# updated_at :datetime not null +# + require 'test_helper' class VoteTest < ActiveSupport::TestCase