Sha256: 882ea6be1f69e0e41b52612938e42335c09f8b5544435b2f4fa3e6cfb75cc065
Contents?: true
Size: 976 Bytes
Versions: 17
Compression:
Stored size: 976 Bytes
Contents
require 'test_helper' require 'generators/adminpanel/gallery/gallery_generator' class GalleryGeneratorTest < Rails::Generators::TestCase tests Adminpanel::GalleryGenerator destination Rails.root.join('tmp/generators') setup :prepare_destination def test_the_generation_of_the_productfiles_migration run_generator ['Product'] assert_migration( 'db/migrate/create_adminpanel_productfiles.rb', /t.integer :product_id/, /create_table :adminpanel_productfiles/ ) end def test_the_generation_of_the_productfile run_generator ['Product'] assert_file( 'app/models/adminpanel/productfile.rb', /mount_uploader :file, ProductfileUploader/ ) end def test_the_generation_of_the_productfile_uploader run_generator ['Product'] assert_file( 'app/uploaders/adminpanel/productfile_uploader.rb' ) end def test_runs_without_errors assert_nothing_raised do run_generator end end end
Version data entries
17 entries across 17 versions & 1 rubygems