blob: 4f20de6ebae08d260c8cd23096cb4b2832d4d2fd (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
require 'rails_generator/generator_test_helper'
class RailsModelSubclassGeneratorTest < GeneratorTestCase
def test_model_subclass_generates_resources
run_generator('model_subclass', %w(Car Product))
assert_generated_model_for :car, "Product"
assert_generated_unit_test_for :car
end
def test_model_subclass_must_have_a_parent_class_name
assert_raise(Rails::Generator::UsageError) { run_generator('model_subclass', %w(Car)) }
end
end
|