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-3.5.1 spec/lib/picky-generators/generators/server/classic_spec.rb
picky-generators-3.5.0 spec/lib/picky-generators/generators/server/classic_spec.rb
picky-generators-3.4.3 spec/lib/picky-generators/generators/server/classic_spec.rb
picky-generators-3.4.2 spec/lib/picky-generators/generators/server/classic_spec.rb
picky-generators-3.4.1 spec/lib/picky-generators/generators/server/classic_spec.rb
picky-generators-3.4.0 spec/lib/picky-generators/generators/server/classic_spec.rb
picky-generators-3.3.3 spec/lib/picky-generators/generators/server/classic_spec.rb
picky-generators-3.3.2 spec/lib/picky-generators/generators/server/classic_spec.rb
picky-generators-3.3.1 spec/lib/picky-generators/generators/server/classic_spec.rb
picky-generators-3.3.0 spec/lib/picky-generators/generators/server/classic_spec.rb
picky-generators-3.2.0 spec/lib/picky-generators/generators/server/classic_spec.rb
picky-generators-3.1.13 spec/lib/picky-generators/generators/server/classic_spec.rb
picky-generators-3.1.12 spec/lib/picky-generators/generators/server/classic_spec.rb
picky-generators-3.1.11 spec/lib/picky-generators/generators/server/classic_spec.rb
picky-generators-3.1.10 spec/lib/picky-generators/generators/server/classic_spec.rb
picky-generators-3.1.9 spec/lib/picky-generators/generators/server/classic_spec.rb
picky-generators-3.1.8 spec/lib/picky-generators/generators/server/classic_spec.rb
picky-generators-3.1.7 spec/lib/picky-generators/generators/server/classic_spec.rb
picky-generators-3.1.6 spec/lib/picky-generators/generators/server/classic_spec.rb
picky-generators-3.1.5 spec/lib/picky-generators/generators/server/classic_spec.rb