Sha256: 23814d8009b08cae0b3fed58f5fdc6ef00285ce2bc28df54859cb7ae4eb59856

Contents?: true

Size: 824 Bytes

Versions: 9

Compression:

Stored size: 824 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
    before do
      @help = capture_stdout do
        Rgentpl::Command::Base.help(Thor::Base.shell.new)
      end
    end

    it 'shows help info' do
      expect(@help).to match(/help/)
    end
  end

  describe 'given a version option' do
    before do
      @version = capture_stdout do
        Rgentpl::Command::Base.start %W[ version ]
      end
    end

    it 'shows version info' do
      expect(@version).to match(/version/)
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
rgentpl-1.0.9 spec/lib/rgentpl/command/base_spec.rb
rgentpl-1.0.8 spec/lib/rgentpl/command/base_spec.rb
rgentpl-1.0.7 spec/lib/rgentpl/command/base_spec.rb
rgentpl-1.0.6 spec/lib/rgentpl/command/base_spec.rb
rgentpl-1.0.5 spec/lib/rgentpl/command/base_spec.rb
rgentpl-1.0.4 spec/lib/rgentpl/command/base_spec.rb
rgentpl-1.0.3 spec/lib/rgentpl/command/base_spec.rb
rgentpl-1.0.2 spec/lib/rgentpl/command/base_spec.rb
rgentpl-1.0.1 spec/lib/rgentpl/command/base_spec.rb