Sha256: 67edef718ba5dc673f8df028a919f764fe609b24382de8d2206625bf86ebf485
Contents?: true
Size: 839 Bytes
Versions: 3
Compression:
Stored size: 839 Bytes
Contents
require 'spec_helper' require 'generators/rails_pages/controller/controller_generator' describe RailsPages::Generators::ControllerGenerator do destination = File.expand_path('../../dummy', __FILE__) context 'generate' do before(:all) do Dir.chdir(destination) { %x(rails generate rails_pages:controller test) } end describe 'tests_controller.rb' do it 'should exist' do expect(File.exist? "#{destination}/app/controllers/tests_controller.rb").to be_true end end end context 'destroy' do before(:all) do Dir.chdir(destination) { %x(rails destroy rails_pages:controller test) } end describe 'tests_controller.rb' do it 'should not exist' do expect(File.exist? "#{destination}/app/controllers/tests_controller.rb").to be_false end end end end
Version data entries
3 entries across 3 versions & 1 rubygems