Sha256: e2e3f1345b5191a4d27096fd448fbda4f5302406c38f74bdc3c9c0f6ff4c2b4c

Contents?: true

Size: 813 Bytes

Versions: 3

Compression:

Stored size: 813 Bytes

Contents

require 'spec_helper'

# Generators are not automatically loaded by Rails
require 'generators/honor/install/install_generator'

describe Honor::Generators::InstallGenerator do
  # Tell the generator where to put its output (what it thinks of as Rails.root)
  destination File.expand_path("../../../../../tmp", __FILE__)

  before do
    prepare_destination
    Rails::Generators.options[:rails][:orm] = :active_record
  end
  describe 'no arguments' do
    before { run_generator  }

    describe 'db/migrate/create_honor_points.rb' do
      subject { file('db/migrate/create_honor_points.rb') }
      it { should be_a_migration }
    end

    describe 'db/migrate/create_honor_scorecards.rb' do
      subject { file('db/migrate/create_honor_scorecards.rb') }
      it { should be_a_migration }
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
honor-1.0.3 spec/generators/install_generator_spec.rb
honor-1.0.2 spec/generators/install_generator_spec.rb
honor-1.0.1 spec/generators/install_generator_spec.rb