Sha256: 0b55ee5c9d0f9c8b5b0c2ddad98093fee4009d2bf8ce801d922c646e59068bfe

Contents?: true

Size: 543 Bytes

Versions: 18

Compression:

Stored size: 543 Bytes

Contents

require 'spec_helper'

RSpec.describe 'init', type: :rake do
  it 'creates new deploy rb' do
    allow(File).to receive(:exist?).and_return(true)
    expect(FileUtils).to receive(:mkdir_p)
    expect(FileUtils).to receive(:cp)

    expect { subject.invoke }.to output("-----> Created ./config/deploy.rb\nEdit this file, then run `mina setup` after.\n").to_stdout
  end

  it 'doesnt create deploy rb if already exists' do
    allow(File).to receive(:exist?).and_return(false)
    expect { subject.invoke }.to raise_error(SystemExit)
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
mina-1.2.4 spec/tasks/init_spec.rb
mina-1.2.3 spec/tasks/init_spec.rb
mina-1.2.2 spec/tasks/init_spec.rb
mina-1.2.1 spec/tasks/init_spec.rb
mina-1.2.0 spec/tasks/init_spec.rb
mina-1.1.1 spec/tasks/init_spec.rb
mina-1.1.0 spec/tasks/init_spec.rb
mina-1.0.7 spec/tasks/init_spec.rb
mina-1.0.6 spec/tasks/init_spec.rb
mina-1.0.5 spec/tasks/init_spec.rb
mina-1.0.4 spec/tasks/init_spec.rb
mina-1.0.3 spec/tasks/init_spec.rb
mina-1.0.2 spec/tasks/init_spec.rb
mina-1.0.0 spec/tasks/init_spec.rb
mina-1.0.0.rc2 spec/tasks/init_spec.rb
mina-1.0.0.beta5 spec/tasks/init_spec.rb
mina-1.0.0.beta4 spec/tasks/init_spec.rb
mina-1.0.0.beta3 spec/tasks/init_spec.rb