diff --git a/CHANGELOG.md b/CHANGELOG.md index 32976301..a7db5244 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,8 @@ master ------ +* Remove support for viewing Ember tests through Rails. Instead, use `ember + test` or `ember test --serve` from within the Ember directory. * Remove `build_timeout` configuration [#259] * Disable JS minification when generating Heroku setup [#238] * `BuildError#message` includes first line of backtrace. [#256] diff --git a/README.md b/README.md index 1c71dabf..cafb5e0f 100644 --- a/README.md +++ b/README.md @@ -230,26 +230,6 @@ export default DS.RESTAdapter.extend({ }); ``` -## Ember Test Suite - -To run an Ember app's tests in a browser, mount the `EmberCli::Engine`: - -```ruby -# config/routes.rb - -Rails.application.routes.draw do - mount EmberCli::Engine => "ember-tests" if Rails.env.development? - - root "application#index" -end -``` - -Ember tests are served based on the route you mount the Engine on (in this -example, `/ember-tests`) and the name of the Ember app. - -For example, to view tests of the `frontend` app, visit -`http://localhost:3000/ember-tests/frontend`. - ### Integrating with Rake EmberCLI Rails exposes the `ember:test` Rake task to execute Ember's test suite. diff --git a/app/controllers/ember_tests_controller.rb b/app/controllers/ember_tests_controller.rb deleted file mode 100644 index 1b2fa815..00000000 --- a/app/controllers/ember_tests_controller.rb +++ /dev/null @@ -1,31 +0,0 @@ -class EmberTestsController < ActionController::Base - def index - render text: test_html_with_corrected_asset_urls, layout: false - end - - private - - def test_html_with_corrected_asset_urls - test_html.gsub(%r{assets/}i, "#{asset_prefix}/#{app_name}/") - end - - def test_html - tests_index_path.read - end - - def tests_index_path - app.tests_path.join("index.html") - end - - def app - EmberCli[app_name] - end - - def app_name - params.fetch(:app_name) - end - - def asset_prefix - Rails.configuration.assets.prefix - end -end diff --git a/config/routes.rb b/config/routes.rb deleted file mode 100644 index d980232b..00000000 --- a/config/routes.rb +++ /dev/null @@ -1,3 +0,0 @@ -EmberCli::Engine.routes.draw do - get ":app_name", to: "ember_tests#index", format: false -end diff --git a/lib/ember-cli/path_set.rb b/lib/ember-cli/path_set.rb index 2ade4393..596db3a1 100644 --- a/lib/ember-cli/path_set.rb +++ b/lib/ember-cli/path_set.rb @@ -53,10 +53,6 @@ def initialize(app:, rails_root:, ember_cli_root:, environment:, configuration:) root.join("Gemfile") end - define_path :tests do - dist.join("tests") - end - define_path :node_modules do root.join("node_modules") end diff --git a/spec/lib/ember-cli/path_set_spec.rb b/spec/lib/ember-cli/path_set_spec.rb index 0b205467..3f1a40fa 100644 --- a/spec/lib/ember-cli/path_set_spec.rb +++ b/spec/lib/ember-cli/path_set_spec.rb @@ -80,14 +80,6 @@ end end - describe "#tests" do - it "is a child of #dist" do - path_set = build_path_set - - expect(path_set.tests).to eq path_set.dist.join("tests") - end - end - describe "#node_modules" do it "is a child of #root" do path_set = build_path_set