mirror of
https://github.com/drapergem/draper
synced 2023-03-27 23:21:17 -04:00
22 lines
No EOL
586 B
Ruby
22 lines
No EOL
586 B
Ruby
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 |