fixing tests (providing default column in test tables)
This commit is contained in:
parent
dc8dd2bb87
commit
89622a2413
|
@ -159,7 +159,7 @@ module AASM
|
|||
# foo.aasm_state # => nil
|
||||
#
|
||||
def aasm_ensure_initial_state
|
||||
send("#{self.class.aasm_column}=", self.aasm_enter_initial_state.to_s) if send(self.class.aasm_column).blank?
|
||||
aasm_enter_initial_state if send(self.class.aasm_column).blank?
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
ActiveRecord::Schema.define(:version => 0) do
|
||||
|
||||
%w{gates readers writers transients simples thieves localizer_test_models}.each do |table_name|
|
||||
create_table table_name, :force => true
|
||||
create_table table_name, :force => true do |t|
|
||||
t.string "aasm_state"
|
||||
end
|
||||
end
|
||||
|
||||
create_table "validators", :force => true do |t|
|
||||
|
|
Loading…
Reference in New Issue