Skip to content

Commit

Permalink
Remove Ember Tests from Rails Engine
Browse files Browse the repository at this point in the history
Remove support for viewing Ember tests through Rails.

Instead, use `ember test` or `ember test --serve` from within the Ember
directory.
  • Loading branch information
seanpdoyle committed Nov 13, 2015
1 parent 2ebd8aa commit a6a4cb4
Show file tree
Hide file tree
Showing 6 changed files with 2 additions and 66 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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]
Expand Down
20 changes: 0 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
31 changes: 0 additions & 31 deletions app/controllers/ember_tests_controller.rb

This file was deleted.

3 changes: 0 additions & 3 deletions config/routes.rb

This file was deleted.

4 changes: 0 additions & 4 deletions lib/ember-cli/path_set.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 0 additions & 8 deletions spec/lib/ember-cli/path_set_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a6a4cb4

Please sign in to comment.