Sha256: 7db64538719f5bd6496d16232d19ff1db91585c4484903f8a5737d5ed6e60c44

Contents?: true

Size: 708 Bytes

Versions: 10

Compression:

Stored size: 708 Bytes

Contents

require 'spec_helper'

describe Rgentpl::Command::Base do
  context 'given a list of options' do
    let(:command) { Rgentpl::Command::Base.new }

    it 'responds successfully to help, version and generate' do
      [:help, :version, :generate].each do |element|
        expect(command).to respond_to element
      end
    end
  end

  describe 'given a help option' do
    it 'shows help info' do
      expect { Rgentpl::Command::Base.help(Thor::Base.shell.new) }.to \
        output(/help/).to_stdout
    end
  end

  describe 'given a version option' do
    it 'shows version info' do
      expect { Rgentpl::Command::Base.start %w( version ) }.to \
        output(/version/).to_stdout
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
rgentpl-1.2.6 spec/lib/rgentpl/command/base_spec.rb
rgentpl-1.2.5 spec/lib/rgentpl/command/base_spec.rb
rgentpl-1.2.4.3 spec/lib/rgentpl/command/base_spec.rb
rgentpl-1.2.4.2 spec/lib/rgentpl/command/base_spec.rb
rgentpl-1.2.4.1 spec/lib/rgentpl/command/base_spec.rb
rgentpl-1.2.4 spec/lib/rgentpl/command/base_spec.rb
rgentpl-1.2.3 spec/lib/rgentpl/command/base_spec.rb
rgentpl-1.2.2 spec/lib/rgentpl/command/base_spec.rb
rgentpl-1.2.1 spec/lib/rgentpl/command/base_spec.rb
rgentpl-1.2.0 spec/lib/rgentpl/command/base_spec.rb