Sha256: a39e0036b7a905754f06b1e0e70f1185d4b4cce46c65f5b5939b12cd56cec7a0

Contents?: true

Size: 797 Bytes

Versions: 5

Compression:

Stored size: 797 Bytes

Contents

require 'spec_helper'

require File.expand_path('../../../lib/generators/google_authentication/install_generator', __FILE__)

describe GoogleAuthentication::Generators::InstallGenerator do
  include GeneratorSpec::TestCase
  destination File.expand_path("../../../tmp", __FILE__)

  before(:each) do
    prepare_destination
  end

  it "creates an initializer file" do
    run_generator
    assert_file "config/initializers/google_authentication.rb", /GoogleAuthentication.setup do |config|/
    assert_file "config/initializers/devise.rb", /Devise.setup do |config|/
  end

  it "accept an option for domain and put it in the initializer file" do
    run_generator %w(--domain domain.com)
    assert_file "config/initializers/google_authentication.rb", /config\.domain = 'domain\.com'/
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
google_authentication-0.3.0 spec/generators/install_generator_spec.rb
google_authentication-0.2.0 spec/generators/install_generator_spec.rb
google_authentication-0.1.2 spec/generators/install_generator_spec.rb
google_authentication-0.1.1 spec/generators/install_generator_spec.rb
google_authentication-0.1.0 spec/generators/install_generator_spec.rb