Sha256: c2c201a652149901578b4c32a98bc847c78c4be016cdeb8b9b67a15a061e801c
Contents?: true
Size: 1.33 KB
Versions: 14
Compression:
Stored size: 1.33 KB
Contents
require "spec_helper" describe "app cli" do describe "install cmd" do let(:test_version){ "2.4.2" } before(:each) do allow(Gems).to receive(:versions).and_return([{"number" => test_version}]) 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") allow(Ask).to receive(:checkbox).and_return([true, false, true]) expect(Negroku::Modes::App).to receive(:select_repo).and_return("git.repo.url") expect(Negroku::Modes::App).to receive(:ask_name).and_return("NewApp") end after(:each) do FakeFS.deactivate! end it "creates the deploy.rb" do Negroku::Modes::App.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 "generate the Capfile" do Negroku::Modes::App.install expect(File).to exist("Capfile") content = File.read("Capfile") expect(content).to match(/^#require 'capistrano3\/unicorn'/) expect(content).to match(/^require 'capistrano\/rbenv'/) end end end
Version data entries
14 entries across 14 versions & 1 rubygems