Sha256: 21d9aa38d3b2a4aceed67669a938061a709a975bf5d1c36ef4eb8b4aae7b7e45

Contents?: true

Size: 1.01 KB

Versions: 42

Compression:

Stored size: 1.01 KB

Contents

# encoding: utf-8
#
require 'spec_helper'

describe Picky::Generators::Server::Sinatra do

  before(:each) do
    @sinatra = Picky::Generators::Server::Sinatra.new :sinatra_server, 'sinatra_server_dir_name'
    @sinatra.stub! :exclaim
  end

  context "after initialize" do
    it 'has the right identifier' do
      @sinatra.identifier.should == :sinatra_server
    end
    it 'has the right name' do
      @sinatra.name.should == 'sinatra_server_dir_name'
    end
    it 'has the right prototype dir' do
      @sinatra.prototype_basedir.should == File.expand_path('../../../../../../prototypes/server/sinatra', __FILE__)
    end
  end

  describe "generate" do
    it "should do things in order" do
      @sinatra.should_receive(:exclaim).once.ordered # Initial explanation
      @sinatra.should_receive(:create_target_directory).once.ordered
      @sinatra.should_receive(:copy_all_files).twice.ordered
      @sinatra.should_receive(:exclaim).at_least(8).times.ordered # Some user steps to do

      @sinatra.generate
    end
  end

end

Version data entries

42 entries across 42 versions & 1 rubygems

Version Path
picky-generators-4.6.3 spec/lib/picky-generators/generators/server/sinatra_spec.rb
picky-generators-4.6.2 spec/lib/picky-generators/generators/server/sinatra_spec.rb
picky-generators-4.6.1 spec/lib/picky-generators/generators/server/sinatra_spec.rb
picky-generators-4.6.0 spec/lib/picky-generators/generators/server/sinatra_spec.rb
picky-generators-4.5.12 spec/lib/picky-generators/generators/server/sinatra_spec.rb
picky-generators-4.5.11 spec/lib/picky-generators/generators/server/sinatra_spec.rb
picky-generators-4.5.10 spec/lib/picky-generators/generators/server/sinatra_spec.rb
picky-generators-4.5.9 spec/lib/picky-generators/generators/server/sinatra_spec.rb
picky-generators-4.5.8 spec/lib/picky-generators/generators/server/sinatra_spec.rb
picky-generators-4.5.7 spec/lib/picky-generators/generators/server/sinatra_spec.rb
picky-generators-4.5.6 spec/lib/picky-generators/generators/server/sinatra_spec.rb
picky-generators-4.5.5 spec/lib/picky-generators/generators/server/sinatra_spec.rb
picky-generators-4.5.4 spec/lib/picky-generators/generators/server/sinatra_spec.rb
picky-generators-4.5.3 spec/lib/picky-generators/generators/server/sinatra_spec.rb
picky-generators-4.5.2 spec/lib/picky-generators/generators/server/sinatra_spec.rb
picky-generators-4.5.1 spec/lib/picky-generators/generators/server/sinatra_spec.rb
picky-generators-4.5.0 spec/lib/picky-generators/generators/server/sinatra_spec.rb
picky-generators-4.4.2 spec/lib/picky-generators/generators/server/sinatra_spec.rb
picky-generators-4.4.1 spec/lib/picky-generators/generators/server/sinatra_spec.rb
picky-generators-4.4.0 spec/lib/picky-generators/generators/server/sinatra_spec.rb