Sha256: 4d0e2628598a9310a4acda75c636bb07e2405161888f2d4ce1b4e853413c359d

Contents?: true

Size: 890 Bytes

Versions: 7

Compression:

Stored size: 890 Bytes

Contents

require 'spec_helper_integration'
require 'generators/capcoauth/install_generator'

describe 'Capcoauth::InstallGenerator' do
  include GeneratorSpec::TestCase

  tests Capcoauth::InstallGenerator
  destination ::File.expand_path('../tmp/dummy', __FILE__)

  describe 'after running the generator' do
    before :each do
      prepare_destination
      FileUtils.mkdir(::File.expand_path('config', Pathname(destination_root)))
      FileUtils.mkdir(::File.expand_path('db', Pathname(destination_root)))
      FileUtils.copy_file(::File.expand_path('../templates/routes.rb', __FILE__), ::File.expand_path('config/routes.rb', Pathname.new(destination_root)))
      run_generator
    end

    it 'creates an initializer file' do
      assert_file 'config/initializers/capcoauth.rb'
    end

    it 'adds sample route' do
      assert_file 'config/routes.rb', /use_capcoauth/
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
capcoauth-0.7.0 spec/generators/install_generator_spec.rb
capcoauth-0.6.3 spec/generators/install_generator_spec.rb
capcoauth-0.6.2 spec/generators/install_generator_spec.rb
capcoauth-0.6.1 spec/generators/install_generator_spec.rb
capcoauth-0.6.0 spec/generators/install_generator_spec.rb
capcoauth-0.5.1 spec/generators/install_generator_spec.rb
capcoauth-0.5.0 spec/generators/install_generator_spec.rb