Sha256: f854bdae78b687d054505dd588250e0a0cb508b785fd4b5d48ab41fda3cbd011

Contents?: true

Size: 1002 Bytes

Versions: 5

Compression:

Stored size: 1002 Bytes

Contents

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

describe Merb::Generators::HelperGenerator do

  before(:each) do
    @generator = Merb::Generators::HelperGenerator.new('/tmp', {}, 'Stuff')
  end
  
  it_should_behave_like "namespaced generator"
  
  it "should create a helper" do
    @generator.should create('/tmp/app/helpers/stuff_helper.rb')
  end
  
  describe "with rspec" do
    
    it "should create a helper spec" do
      @generator.should create('/tmp/spec/helpers/stuff_helper_spec.rb')
    end
    
  end
  
  describe "with a namespace" do
    
    before(:each) do
      @generator = Merb::Generators::HelperGenerator.new('/tmp', {}, 'John::Monkey::Stuff')
    end
    
    it "should create a helper" do
      @generator.should create('/tmp/app/helpers/john/monkey/stuff_helper.rb')
    end

    describe "with rspec" do

      it "should create a helper spec" do
        @generator.should create('/tmp/spec/helpers/john/monkey/stuff_helper_spec.rb')
      end

    end

  end
  
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
merb-gen-0.9.6 spec/helper_spec.rb
merb-gen-0.9.7 spec/helper_spec.rb
merb-gen-0.9.4 spec/helper_spec.rb
merb-gen-0.9.5 spec/helper_spec.rb
merb-gen-0.9.8 spec/helper_spec.rb