Sha256: 6b5fe60f5f61f8b620b9573fbfd6defab989ec31229a473991bfa5ecbd7754ab

Contents?: true

Size: 1.66 KB

Versions: 7

Compression:

Stored size: 1.66 KB

Contents

require 'spec_helper'

RSpec.describe 'rails', type: :rake do
  describe 'console' do
    it 'starts console' do
      expect { invoke_all }.to output(output_file('console')).to_stdout
    end
  end

  describe 'log' do
    it 'tails log' do
      expect { invoke_all }.to output(output_file('log')).to_stdout
    end
  end

  describe 'rails:db_migrate' do
    it 'rails db migrate' do
      Mina::Configuration.instance.set(:deploy_block, true)
      expect { invoke_all }.to output(output_file('rails_db_migrate')).to_stdout
      Mina::Configuration.instance.set(:deploy_block, false)
    end
  end

  describe 'rails:db_create' do
    it 'rails db create' do
      expect { invoke_all }.to output(output_file('rails_db_create')).to_stdout
    end
  end

  describe 'rails:db_rollback' do
    it 'rails db rollback' do
      expect { invoke_all }.to output(output_file('rails_db_rollback')).to_stdout
    end
  end

  describe 'rails:assets_precompile' do
    it 'rails assets precompile' do
      Mina::Configuration.instance.set(:deploy_block, true)
      expect { invoke_all }.to output(output_file('rails_assets_precompile')).to_stdout
      Mina::Configuration.instance.set(:deploy_block, false)
    end
  end

  describe 'rails:assets_clean' do
    it 'rails assets clean' do
      expect { invoke_all }.to output(output_file('rails_assets_clean')).to_stdout
    end
  end

  describe 'rails:db_schema_load' do
    it 'rails db schema load' do
      expect { invoke_all }.to output(output_file('rails_db_schema_load')).to_stdout
    end
  end
  # describe 'rollback' do
  #   it 'rollback' do
  #     expect { invoke_all }.to output(output_file('rollback')).to_stdout
  #   end
  # end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
mina-1.2.4 spec/tasks/rails_spec.rb
mina-1.2.3 spec/tasks/rails_spec.rb
mina-1.2.2 spec/tasks/rails_spec.rb
mina-1.2.1 spec/tasks/rails_spec.rb
mina-1.2.0 spec/tasks/rails_spec.rb
mina-1.1.1 spec/tasks/rails_spec.rb
mina-1.1.0 spec/tasks/rails_spec.rb