spec/generators/resource_generator_spec.rb in adminpanel-1.2.11 vs spec/generators/resource_generator_spec.rb in adminpanel-1.2.12
- old
+ new
@@ -20,10 +20,11 @@
run_generator %w(
post
name
description:wysiwyg
number:float
+ flag:boolean
quantity:integer
date:datepicker
photo:images
)
end
@@ -35,10 +36,11 @@
context 'the migration' do
it 'should have the correct fields' do
migration_file('db/migrate/create_posts_table.rb').should(
contain(/t.string :name/) &&
contain(/t.float :number/) &&
+ contain(/t.boolean :flag/) &&
contain(/t.integer :quantity/) &&
contain(/t.string :date/) &&
contain(/t.text :description/)
)
end
@@ -68,9 +70,11 @@
contain(/'type' => 'wysiwyg_field',/) &&
contain(/'name' => \{/) &&
contain(/'type' => 'text_field',/) &&
contain(/'number' => \{/) &&
contain(/'type' => 'text_field',/) &&
+ contain(/'flag' => \{/) &&
+ contain(/'type' => 'boolean',/) &&
contain(/'quantity' => \{/) &&
contain(/'type' => 'number_field',/) &&
contain(/'date' => \{/) &&
contain(/'type' => 'datepicker_field',/) &&
contain(/'postfiles' => \{/) &&