Sha256: c22e45b03bb613fabda00b605510a123ce3f801a36da065a89a343bab2cf6e7f
Contents?: true
Size: 800 Bytes
Versions: 29
Compression:
Stored size: 800 Bytes
Contents
require File.expand_path(File.dirname(__FILE__) + '/../helpers/model_test_helper') class NoteTest < ModelTestCase include DataCatalog context "Note" do before do @user = create_user @required = { :text => "Example Note", :user_id => @user.id } end after do @user.destroy end context "correct params" do before do @note = Note.new(@required) end test "should be valid" do assert_equal true, @note.valid? end end [:text, :user_id].each do |missing| context "missing #{missing}" do before do @note = Note.new(@required.delete_if { |k, v| k == missing }) end missing_key(:note, missing) end end end end
Version data entries
29 entries across 29 versions & 1 rubygems