Sha256: 5f4d722a4dd78d9f6e4d498f19fcfe38799806428e4483adfadafb9fcfc51b30

Contents?: true

Size: 664 Bytes

Versions: 1

Compression:

Stored size: 664 Bytes

Contents

require 'spec_helper'

# Generators are not automatically loaded by Rails
require 'generators/draper/decorator/decorator_generator'

describe Draper::DecoratorGenerator do
  # Tell the generator where to put its output (what it thinks of as Rails.root)
  destination File.expand_path("../../../../../tmp", __FILE__)

  before { prepare_destination }

  describe 'no arguments' do
    before { run_generator %w(products)  }

    describe 'app/decorators/products_decorator.rb' do
      subject { file('app/decorators/products_decorator.rb') }
      it { should exist }
      it { should contain "class ProductsDecorator < ApplicationDecorator" }
    end

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
draper-0.10.0 spec/generators/draper/decorator/decorator_generator_spec.rb