4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
# File 'lib/woulda/acts_as_versioned/macros.rb', line 4
def should_act_as_versioned
klass = model_class
should_have_db_table "#{klass}_versions".tableize
should_have_db_column :version
context "A #{klass.name}" do
should "include acts as versioned" do
assert klass.included_modules.include?(ActiveRecord::Acts::Versioned), "#{klass.name} should act_as_versioned"
end
should "be versioned" do
assert_respond_to klass, :acts_as_versioned, "#{klass.name} should act_as_versioned"
end
end
end
|