Sha256: 70a28e975a6406b99a39a1185620f98bbc9fdcc85a57d04f897f5ab78f53f519

Contents?: true

Size: 992 Bytes

Versions: 18

Compression:

Stored size: 992 Bytes

Contents

require 'spec_helper_integration'
require 'generators/doorkeeper/install_generator'

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

  tests Doorkeeper::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/doorkeeper.rb'
    end

    it "copies the locale file" do
      assert_file 'config/locales/doorkeeper.en.yml'
    end

    it "adds sample route" do
      assert_file "config/routes.rb", /use_doorkeeper/
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
doorkeeper-1.1.0 spec/generators/install_generator_spec.rb
doorkeeper-1.0.0 spec/generators/install_generator_spec.rb
doorkeeper-1.0.0.rc2 spec/generators/install_generator_spec.rb
doorkeeper-1.0.0.rc1 spec/generators/install_generator_spec.rb
doorkeeper-0.7.4 spec/generators/install_generator_spec.rb
doorkeeper-0.7.3 spec/generators/install_generator_spec.rb
doorkeeper-0.7.2 spec/generators/install_generator_spec.rb
doorkeeper-0.7.1 spec/generators/install_generator_spec.rb
doorkeeper-0.7.0 spec/generators/install_generator_spec.rb
doorkeeper-0.6.7 spec/generators/install_generator_spec.rb
doorkeeper-0.6.6 spec/generators/install_generator_spec.rb
doorkeeper-0.6.5 spec/generators/install_generator_spec.rb
doorkeeper-0.6.4 spec/generators/install_generator_spec.rb
doorkeeper-0.6.3 spec/generators/install_generator_spec.rb
doorkeeper-0.6.2 spec/generators/install_generator_spec.rb
doorkeeper-0.6.1 spec/generators/install_generator_spec.rb
doorkeeper-0.6.0 spec/generators/install_generator_spec.rb
doorkeeper-0.6.0.rc1 spec/generators/install_generator_spec.rb