Sha256: 7787684537ddd0394546cd79526a195b737a00490ad221db56f5a0365f897f6a

Contents?: true

Size: 1.16 KB

Versions: 7

Compression:

Stored size: 1.16 KB

Contents

require 'spec_helper'
# require 'migration-spec'
# require 'rails3_assist'

# RSpec::Generator.debug = true
# 
# require_generator :migration
# 
# describe 'migration_generator' do
#   use_orm :active_record
#   use_helpers :migration, :helper
#   
#   before :each do              
#     setup_generator 'migration_generator' do
#       tests MigrationGenerator
#     end        
#     remove_migration :create_users    
#   end
# 
#   after :each do
#   end
#     
#   it "should generate create_user migration" do    
#     with_generator do |g|
#       g.run_generator :create_users.args
#       g.should generate_migration :create_users do |content|
#         content.should have_migration :create_users do |klass|
#           klass.should have_up do |up|
#             up.should have_create_table :users do |user_tbl|
#               user_tbl.should have_columns :name => :string, :age => :integer, :admin => :boolean
#               user_tbl.should_not have_timestamps              
#             end
#           end
# 
#           klass.should have_down do |up|
#             up.should have_drop_table :users
#           end
#         end
#       end
#     end
#   end
# end
# 
# 
# 

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
migration_assist-0.1.8 spec/generators/migration_generator_spec.rb
migration_assist-0.1.7 spec/generators/migration_generator_spec.rb
migration_assist-0.1.6 spec/generators/migration_generator_spec.rb
migration_assist-0.1.5 spec/generators/migration_generator_spec.rb
migration_assist-0.1.4 spec/generators/migration_generator_spec.rb
migration_assist-0.1.3 spec/generators/migration_generator_spec.rb
migration_assist-0.1.2 spec/generators/migration_generator_spec.rb