Sha256: a631c467a8fbc8cc8efadd52cbfd01036e98ae29bf2ae37605a02d31160f7419

Contents?: true

Size: 1.03 KB

Versions: 51

Compression:

Stored size: 1.03 KB

Contents

# encoding: utf-8
#
require 'spec_helper'

describe Picky::Generators::Server::Classic do
  
  before(:each) do
    @classic = Picky::Generators::Server::Classic.new :classic_server, 'classic_server_dir_name'
    @classic.stub! :exclaim
  end
  
  context "after initialize" do
    it 'has the right identifier' do
      @classic.identifier.should == :classic_server
    end
    it 'has the right name' do
      @classic.name.should == 'classic_server_dir_name'
    end
    it 'has the right prototype dir' do
      @classic.prototype_basedir.should == File.expand_path('../../../../../../prototypes/server/classic', __FILE__)
    end
  end
  
  describe "generate" do
    it "should do things in order" do
      @classic.should_receive(:exclaim).once.ordered # Initial explanation
      @classic.should_receive(:create_target_directory).once.ordered
      @classic.should_receive(:copy_all_files).twice.ordered
      @classic.should_receive(:exclaim).at_least(9).times.ordered # Some user steps to do
      
      @classic.generate
    end
  end
  
end

Version data entries

51 entries across 51 versions & 1 rubygems

Version Path
picky-generators-4.0.0pre1 spec/lib/picky-generators/generators/server/classic_spec.rb
picky-generators-3.6.16 spec/lib/picky-generators/generators/server/classic_spec.rb
picky-generators-3.6.15 spec/lib/picky-generators/generators/server/classic_spec.rb
picky-generators-3.6.14 spec/lib/picky-generators/generators/server/classic_spec.rb
picky-generators-3.6.13 spec/lib/picky-generators/generators/server/classic_spec.rb
picky-generators-3.6.12 spec/lib/picky-generators/generators/server/classic_spec.rb
picky-generators-3.6.11 spec/lib/picky-generators/generators/server/classic_spec.rb
picky-generators-3.6.10 spec/lib/picky-generators/generators/server/classic_spec.rb
picky-generators-3.6.9 spec/lib/picky-generators/generators/server/classic_spec.rb
picky-generators-3.6.8 spec/lib/picky-generators/generators/server/classic_spec.rb
picky-generators-3.6.7 spec/lib/picky-generators/generators/server/classic_spec.rb
picky-generators-3.6.6 spec/lib/picky-generators/generators/server/classic_spec.rb
picky-generators-3.6.4 spec/lib/picky-generators/generators/server/classic_spec.rb
picky-generators-3.6.3 spec/lib/picky-generators/generators/server/classic_spec.rb
picky-generators-3.6.2 spec/lib/picky-generators/generators/server/classic_spec.rb
picky-generators-3.6.1 spec/lib/picky-generators/generators/server/classic_spec.rb
picky-generators-3.6.0 spec/lib/picky-generators/generators/server/classic_spec.rb
picky-generators-3.5.4 spec/lib/picky-generators/generators/server/classic_spec.rb
picky-generators-3.5.3 spec/lib/picky-generators/generators/server/classic_spec.rb
picky-generators-3.5.2 spec/lib/picky-generators/generators/server/classic_spec.rb