Sha256: e7ee6e37adc5301cf3384342c483842555a96e416659b41f7382f36a44b263ac

Contents?: true

Size: 572 Bytes

Versions: 4

Compression:

Stored size: 572 Bytes

Contents

require 'spec_helper'

require 'generators/context/context_generator'

describe Rails::Generators::ContextGenerator do
  destination ::File.expand_path('../../../tmp', __FILE__)
  arguments %w(Your)

  before do
    prepare_destination
    run_generator
  end

  specify 'should generate app/contexts/your_context.rb' do
    destination_root.should have_structure do
      directory 'app' do
        directory 'contexts' do
          file 'your_context.rb' do
            contains 'class YourContext < Dicer::Context'
          end
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
dicer-0.3.0 examples/rails-3.2/spec/generators/context_generator_spec.rb
dicer-0.2.0 examples/rails-3.2/spec/generators/context_generator_spec.rb
dicer-0.1.0 examples/rails-3.2/spec/generators/context_generator_spec.rb
dicer-0.0.1 examples/rails-3.2/spec/generators/context_generator_spec.rb