Sha256: 09d86d9d1a9e4443be3375095f6c2f47672ecbd1a2274c6955d805fc70472c57

Contents?: true

Size: 586 Bytes

Versions: 7

Compression:

Stored size: 586 Bytes

Contents

require 'spec_helper'
require 'rails'
require 'ammeter/init'
require 'generators/controller_override'
require 'generators/rails/decorator_generator'

describe Rails::Generators::ControllerGenerator do
  destination File.expand_path("../tmp", __FILE__)

  before { prepare_destination }
  after(:all) { FileUtils.rm_rf destination_root }

  describe "the generated decorator" do
    subject { file("app/decorators/your_model_decorator.rb") }

    describe "naming" do
      before { run_generator %w(YourModels) }

      it { should contain "class YourModelDecorator" }
    end
  end
end

Version data entries

7 entries across 7 versions & 3 rubygems

Version Path
draper-3.0.0.pre1 spec/generators/controller/controller_generator_spec.rb
draper_new-3.0.0 spec/generators/controller/controller_generator_spec.rb
sc_core-0.0.7 test/dummy/vendor/bundle/ruby/2.2.0/gems/draper-2.1.0/spec/generators/controller/controller_generator_spec.rb
draper-2.1.0 spec/generators/controller/controller_generator_spec.rb
draper-2.0.0 spec/generators/controller/controller_generator_spec.rb
draper-1.4.0 spec/generators/controller/controller_generator_spec.rb
draper-1.3.1 spec/generators/controller/controller_generator_spec.rb