Sha256: 3e1991b3bb2cd86343bcacf25fc6933dd04606c4725b0ff1496058c00dd33295

Contents?: true

Size: 934 Bytes

Versions: 24

Compression:

Stored size: 934 Bytes

Contents

require File.dirname(__FILE__) + '/spec_helper'

describe Merb::Generators::PartControllerGenerator do

  before(:each) do
    @generator = Merb::Generators::PartControllerGenerator.new('/tmp', {}, 'Stuff')
  end
  
  it_should_behave_like "namespaced generator"
  
  it "should create a controller" do
    @generator.should create('/tmp/app/parts/stuff_part.rb')
  end
  
  it "should create a view" do
    @generator.should create('/tmp/app/parts/views/stuff_part/index.html.erb')
  end
  
  describe "with a namespace" do
    
    before(:each) do
      @generator = Merb::Generators::PartControllerGenerator.new('/tmp', {}, 'John::Monkey::Stuff')
    end
    
    it "should create a controller" do
      @generator.should create('/tmp/app/parts/john/monkey/stuff_part.rb')
    end

    it "should create a view" do
      @generator.should create('/tmp/app/parts/views/john/monkey/stuff_part/index.html.erb')
    end

  end
  
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
merb-gen-1.0.15 spec/part_controller_spec.rb
merb-gen-1.0.14 spec/part_controller_spec.rb
merb-gen-1.0.13 spec/part_controller_spec.rb
merb-gen-1.0.12 spec/part_controller_spec.rb
merb-gen-0.9.10 spec/part_controller_spec.rb
merb-gen-0.9.12 spec/part_controller_spec.rb
merb-gen-0.9.11 spec/part_controller_spec.rb
merb-gen-0.9.13 spec/part_controller_spec.rb
merb-gen-0.9.9 spec/part_controller_spec.rb
merb-gen-1.0.1 spec/part_controller_spec.rb
merb-gen-1.0.10 spec/part_controller_spec.rb
merb-gen-1.0.11 spec/part_controller_spec.rb
merb-gen-1.0.2 spec/part_controller_spec.rb
merb-gen-1.0.5 spec/part_controller_spec.rb
merb-gen-1.0.8 spec/part_controller_spec.rb
merb-gen-1.0.8.1 spec/part_controller_spec.rb
merb-gen-1.0.3 spec/part_controller_spec.rb
merb-gen-1.0.4 spec/part_controller_spec.rb
merb-gen-1.0.6 spec/part_controller_spec.rb
merb-gen-1.0.6.1 spec/part_controller_spec.rb