From e49dfcb09a888650e149efa3ccbe1acc574ac812 Mon Sep 17 00:00:00 2001 From: Andrew Brown Date: Sat, 22 Dec 2012 19:29:13 -0600 Subject: [PATCH] user model --- app/models/user.rb | 8 ++++++++ test/fixtures/users.yml | 11 +++++++++++ test/unit/user_test.rb | 7 +++++++ 3 files changed, 26 insertions(+) create mode 100644 app/models/user.rb create mode 100644 test/fixtures/users.yml create mode 100644 test/unit/user_test.rb diff --git a/app/models/user.rb b/app/models/user.rb new file mode 100644 index 00000000..08bb2b93 --- /dev/null +++ b/app/models/user.rb @@ -0,0 +1,8 @@ +class User + include Mongoid::Document + include Mongoid::Timestamps + + field :username, type: String + field :email, type: String + field :password, type: String +end diff --git a/test/fixtures/users.yml b/test/fixtures/users.yml new file mode 100644 index 00000000..c63aac0b --- /dev/null +++ b/test/fixtures/users.yml @@ -0,0 +1,11 @@ +# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html + +# This model initially had no columns defined. If you add columns to the +# model remove the '{}' from the fixture names and add the columns immediately +# below each fixture, per the syntax in the comments below +# +one: {} +# column: value +# +two: {} +# column: value diff --git a/test/unit/user_test.rb b/test/unit/user_test.rb new file mode 100644 index 00000000..82f61e01 --- /dev/null +++ b/test/unit/user_test.rb @@ -0,0 +1,7 @@ +require 'test_helper' + +class UserTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end