Sha256: 3bbd20ef45f214fcee21c775ab21c9b87330263a4e76095dc820924bb630bfea

Contents?: true

Size: 1.09 KB

Versions: 5

Compression:

Stored size: 1.09 KB

Contents

# frozen_string_literal: true

require 'spec_helper'

RSpec.describe Kowl::Docker do
  before(:each) do
    # Include the Kowl::Docker module in a class in order to make it testible
    # => This is because it is also included into the Rails generator class
    class KowlClass
      include Kowl::Actions
    end
    @kowl = KowlClass.new
  end

  context 'database route (pghero)' do
    it { expect(@kowl.database_route).to eq('') }
    it { expect(@kowl.database_route('mysql')).to eq('') }
    it { expect(@kowl.database_route('postgresql')).to eq("  mount PgHero::Engine, at: \"pghero\"\n") }
  end

  context 'mailers' do
    it { expect(@kowl.mailer_gems('postmark')).to eq("gem 'postmark-rails'") }
    it { expect(@kowl.mailer_gems).to eq("gem 'sparkpost_rails'") }
  end

  context 'pry_gems' do
    it { expect(@kowl.pry_gems(true)).to eq(nil) }
  end

  context 'robocop test engine' do
    it { expect(@kowl.robocop_test_engine).to eq('') }
    it { expect(@kowl.robocop_test_engine('minitest')).to include('minitest') }
    it { expect(@kowl.robocop_test_engine('rspec')).to include('rspec') }
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
kowl-0.0.7 spec/kowl/actions_spec.rb
kowl-0.0.6 spec/kowl/actions_spec.rb
kowl-0.0.5 spec/kowl/actions_spec.rb
kowl-0.0.4 spec/kowl/actions_spec.rb
kowl-0.0.3 spec/kowl/actions_spec.rb