Sha256: 7c302c0488bdb607eef89e4c2bc83bc0095d8e9126217a0f8af8f7c80980c2f5

Contents?: true

Size: 1.08 KB

Versions: 20

Compression:

Stored size: 1.08 KB

Contents

require "spec_helper"

module Ask;end

describe "bootstrap cli" do

  describe "install cmd" do

    context "bootstrap app" do

      before(:each) do
        FakeFS::FileSystem.clear
        FakeFS::FileSystem.clone(File.join('lib','negroku','templates'))
        FakeFS::FileSystem.clone(File.join('lib','negroku','locales'))
        FakeFS.activate!

        Dir.mkdir("config")
        Dir.mkdir("config/deploy")

        expect(Negroku::Bootstrap).to receive(:select_repo).and_return("git.repo.url")
        expect(Negroku::Bootstrap).to receive(:ask_name).and_return("NewApp")

      end

      after(:each) do
        FakeFS.deactivate!
      end

      it "creates the deploy.rb" do
        Negroku::Bootstrap.install

        expect(File).to exist("config/deploy.rb")
        content = File.read("config/deploy.rb")
        expect(content).to match(/set :application,\s+'NewApp'/)
        expect(content).to match(/set :repo_url,\s+'git.repo.url'/)
      end

      it "copies the Capfile" do
        Negroku::Bootstrap.install

        expect(File).to exist("Capfile")
      end

    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
negroku-2.4.2 spec/lib/cli/bootstrap_spec.rb
negroku-2.4.1 spec/lib/cli/bootstrap_spec.rb
negroku-2.4.0 spec/lib/cli/bootstrap_spec.rb
negroku-2.3.5 spec/lib/cli/bootstrap_spec.rb
negroku-2.3.4 spec/lib/cli/bootstrap_spec.rb
negroku-2.3.3 spec/lib/cli/bootstrap_spec.rb
negroku-2.3.2 spec/lib/cli/bootstrap_spec.rb
negroku-2.3.1 spec/lib/cli/bootstrap_spec.rb
negroku-2.3.0 spec/lib/cli/bootstrap_spec.rb
negroku-2.2.0 spec/lib/cli/bootstrap_spec.rb
negroku-2.1.0 spec/lib/cli/bootstrap_spec.rb
negroku-2.0.3 spec/lib/cli/bootstrap_spec.rb
negroku-2.0.2 spec/lib/cli/bootstrap_spec.rb
negroku-2.0.1 spec/lib/cli/bootstrap_spec.rb
negroku-2.0.0 spec/lib/cli/bootstrap_spec.rb
negroku-2.0.0.pre7 spec/lib/cli/bootstrap_spec.rb
negroku-2.0.0.pre6 spec/lib/cli/bootstrap_spec.rb
negroku-2.0.0.pre5 spec/lib/cli/bootstrap_spec.rb
negroku-2.0.0.pre4 spec/lib/cli/bootstrap_spec.rb
negroku-2.0.0.pre3 spec/lib/cli/bootstrap_spec.rb