File: outside_project_spec.rb

package info (click to toggle)
ruby-mina 0.3.7-1.1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye
  • size: 444 kB
  • sloc: ruby: 1,630; makefile: 31
file content (35 lines) | stat: -rw-r--r-- 848 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
require 'spec_helper'
require 'command_helper'

describe "Invoking the 'mina' command outside a project" do
  before :each do
    Dir.chdir root
  end

  describe "without arguments" do
    before :each do
      mina
    end

    it 'should print standard help tasks' do
      expect(stdout).to include('mina help')
      expect(stdout).to include('mina init')
      expect(stdout).to include('mina tasks')
    end

    it "should not print project-specific tasks" do
      expect(stdout).not_to include('mina deploy')
      expect(stdout).not_to include('mina restart')
      expect(stdout).not_to include('mina setup')
    end

    %w[-h --help].each do |arg|
      it "should have the same output as 'mina #{arg}'" do
        @previous_output = stdout
        mina arg
        expect(stdout).to eq(@previous_output)
      end
    end
  end
end