Sha256: 9e73791406b95463c0f8c46f2c3926bdd325e7bbf049de75272d076345705ee9
Contents?: true
Size: 728 Bytes
Versions: 14
Compression:
Stored size: 728 Bytes
Contents
require File.expand_path(File.dirname(__FILE__) + '/../helpers/model_test_helper') class CategoryTest < ModelTestCase include DataCatalog context "Category" do before do @required = { :name => "Science & Technology" } end context "correct params" do before do @category = Category.new(@required) end test "should be valid" do assert_equal true, @category.valid? end end [:name].each do |missing| context "missing #{missing}" do before do @category = Category.new(@required.delete_if { |k, v| k == missing }) end missing_key(:category, missing) end end end end
Version data entries
14 entries across 14 versions & 1 rubygems