test/integration/webhookr/init_generator_test.rb in webhookr-0.2.0 vs test/integration/webhookr/init_generator_test.rb in webhookr-0.3.0
- old
+ new
@@ -1,27 +1,28 @@
+# frozen_string_literal: true
-$: << File.join(File.dirname(__FILE__), %w{ .. .. })
+$LOAD_PATH << File.join(File.dirname(__FILE__), %w{ .. .. })
require 'test_helper'
require 'generators/webhookr/init_generator'
class InitGeneratorTest < Rails::Generators::TestCase
tests Webhookr::Generators::InitGenerator
- destination File.expand_path("../../../tmp", File.dirname(__FILE__))
+ destination File.expand_path('../../../tmp', File.dirname(__FILE__))
setup :prepare_destination
def setup
- @name = "test_initializer"
+ @name = 'test_initializer'
@initializer = "config/initializers/#{@name}.rb"
run_generator Array.wrap(@name)
end
- test "it should create the initializer" do
+ test 'it should create the initializer' do
assert_file @initializer
end
- test "it should have authorization information" do
+ test 'it should have authorization information' do
assert_file @initializer do |content|
assert_match(%r{basic_auth\.username}, content)
assert_match(%r{basic_auth\.password}, content)
end
end
-end
\ No newline at end of file
+end