Sha256: 801ab07c623e008dbc67fa21b353e6cc1d879c7a0bc6bc348c2b08681223032d

Contents?: true

Size: 810 Bytes

Versions: 10

Compression:

Stored size: 810 Bytes

Contents

require 'rails_helper'
require 'generators/csv_import_magic/controllers_generator'

RSpec.describe CsvImportMagic::Generators::ControllersGenerator, type: :generator do
  destination File.expand_path('../../../../../tmp', __FILE__)

  before do
    prepare_destination
    run_generator
  end

  after { prepare_destination }

  specify 'check structure of base_controller' do
    base_controller_content = <<-EOF
module CsvImportMagic
  class BaseController < ActionController::Base
  end
end
    EOF

    expect(destination_root).to have_structure {
      directory 'app' do
        directory 'controllers' do
          directory 'csv_import_magic' do
            file 'base_controller.rb' do
              contains base_controller_content
            end
          end
        end
      end
    }
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
csv_import_magic-0.0.11 spec/lib/generators/csv_import_magic/controllers_generator_spec.rb
csv_import_magic-0.0.10 spec/lib/generators/csv_import_magic/controllers_generator_spec.rb
csv_import_magic-0.0.8 spec/lib/generators/csv_import_magic/controllers_generator_spec.rb
csv_import_magic-0.0.7 spec/lib/generators/csv_import_magic/controllers_generator_spec.rb
csv_import_magic-0.0.6 spec/lib/generators/csv_import_magic/controllers_generator_spec.rb
csv_import_magic-0.0.5 spec/lib/generators/csv_import_magic/controllers_generator_spec.rb
csv_import_magic-0.0.4 spec/lib/generators/csv_import_magic/controllers_generator_spec.rb
csv_import_magic-0.0.3 spec/lib/generators/csv_import_magic/controllers_generator_spec.rb
csv_import_magic-0.0.2 spec/lib/generators/csv_import_magic/controllers_generator_spec.rb
csv_import_magic-0.0.1 spec/lib/generators/csv_import_magic/controllers_generator_spec.rb