Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing module namespacing wrapper #28013

Merged
merged 2 commits into from
Feb 19, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
require 'test_helper'

<% module_namespacing do -%>
class <%= class_name %>Test < ActionDispatch::IntegrationTest
# test "the truth" do
# assert true
# end
end
<% end -%>
8 changes: 6 additions & 2 deletions railties/test/generators/integration_test_generator_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,14 @@

class IntegrationTestGeneratorTest < Rails::Generators::TestCase
include GeneratorsTestHelper
arguments %w(integration)

def test_integration_test_skeleton_is_created
run_generator
run_generator %w(integration)
assert_file "test/integration/integration_test.rb", /class IntegrationTest < ActionDispatch::IntegrationTest/
end

def test_namespaced_integration_test_skeleton_is_created
run_generator %w(iguchi/integration)
assert_file "test/integration/iguchi/integration_test.rb", /class Iguchi::IntegrationTest < ActionDispatch::IntegrationTest/
end
end