Created
July 16, 2010 14:48
-
-
Save bernerdschaefer/478443 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# mongoid issue #136 | |
require 'rails' | |
require 'rspec' | |
require 'mongoid' | |
Mongoid.configure do |config| | |
config.master = Mongo::Connection.new.db('testing') | |
end | |
class User | |
include Mongoid::Document | |
field :password | |
field :name | |
validates :password, :presence => true | |
validates :name, :presence =>true | |
collection.remove | |
end | |
describe User do | |
it { should_not be_valid } | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment