Sha256: f0f154208719ecd9d7192ae2aef997535d70254a020b5c8388dd04dd7d4bf439

Contents?: true

Size: 700 Bytes

Versions: 3

Compression:

Stored size: 700 Bytes

Contents

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

describe Rhogen::AppGenerator do
  
  app_name = 'NeatApp'

  it "should complain if no name is specified" do
    lambda {
      @generator = Rhogen::AppGenerator.new('/tmp', {})
    }.should raise_error(::Templater::TooFewArgumentsError)
  end
  
  before do
    @generator = Rhogen::AppGenerator.new('/tmp', {}, app_name)
  end
  
  it "should create application.rb and index.html files" do
    ['application.rb', 'index.html'].each do |template|
      @generator.should create("/tmp/#{app_name}/#{template}")
    end
  end
  
  it "should generate valid erb templates" do
    pending "need to figure out how to validate erb"
  end
  
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
rhodes-0.1.1 spec/app_generator_spec.rb
rhodes-0.1.2 spec/app_generator_spec.rb
rhodes-0.1.0 spec/app_generator_spec.rb