Sha256: 04fd62098682d82192fecdda1336bc1af90128179c3871fcc43770a0e4718bcc

Contents?: true

Size: 882 Bytes

Versions: 1

Compression:

Stored size: 882 Bytes

Contents

# frozen_string_literal: true

describe Zapata::Revolutionist do
  describe '#generate_with_friendly_output' do
    let(:file_name) { 'app/models/test_array.rb' }

    context 'with the generate command' do
      context 'with single specified' do
        it 'returns a single file generation message' do
          output = execution_output("cd #{RAILS_TEST_APP_DIR} && bundle exec zapata generate #{file_name} -s")
          expect(output.count).to eq 1
          expect(output.first).to eq "Its done, comrades. File spec/models/test_array_spec.rb was generated.\n"
        end
      end

      context 'with no single specified' do
        it 'returns mulptile files generation messages' do
          output = execution_output("cd #{RAILS_TEST_APP_DIR} && bundle exec zapata generate #{file_name}")
          expect(output.count).to be > 1
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
zapata-1.0.0 spec/generation_spec.rb