Sha256: 1df4a3dc098466d8ce9dcb7764412d87ccd5b53f8df44dad1169b092e3c6ffae

Contents?: true

Size: 839 Bytes

Versions: 1

Compression:

Stored size: 839 Bytes

Contents

require 'test_helper'
require 'generators/blacklight_google_analytics_generator'

class GeneratorTest < Rails::Generators::TestCase
  tests BlacklightGoogleAnalyticsGenerator  
  destination File.join(Rails.root, 'tmp')
  setup :prepare_destination
  
    
  test "Assert initializer created" do    
    run_generator
    assert_file "config/initializers/blacklight_google_analytics.rb", /BlacklightGoogleAnalytics.web_property_id/
  end
  
  # test "Assert contents of application.js" do    
  #   run_generator
  #   assert_file "app/assets/javascripts/application.js", /\/\/= require blacklight_google_analytics/    
  # end
  # 
  # test "Assert contents of catalog_controller.rb" do
  #   run_generator
  #   assert_file "app/controllers/catalog_controller.rb", 'include BlacklightGoogleAnalytics::ControllerExtraHead'
  # end 
  
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
blacklight_google_analytics-0.0.1.pre3 test/generator_test.rb