-
Notifications
You must be signed in to change notification settings - Fork 16
/
TESTING
62 lines (37 loc) · 1.62 KB
/
TESTING
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# How To Test
0. Choose a Gemfile to use for testing:
$ export BUNDLE_GEMFILE=`pwd`/gemfiles/rails-3.2
Note: this must be an absolute path to the Gemfile, or sub-projects
won't be able to find it.
1. Install the bundle:
$ bundle install
2. Run the test suites for each project, one after another, until a failure
is encountered or all of the tests pass:
$ rake
This will run the tests in jax-core. If RSpec passes, the Jasmine tests
will be fired up using a browser. If Jasmine passes, Rake will move on
to the tests in jax-engine, where RSpec will be invoked.
# Testing `jax-core` In Browser
If you want to run Jasmine tests in `jax-core` but not from the command line,
start the server like so:
$ cd jax-core
$ rake jasmine
The Jasmine server will start on port 8888.
# Testing `jax-engine` In Browser
The Jasmine tests for `jax-engine` do not yet run as part of the Rake task.
To invoke them, you have to start the `jax-engine` app server like so:
$ cd jax-engine
$ bundle exec rackup
The server will start on port 9292. Visit http://localhost:9292/jax to start
the in-browser development environment, and run the `jax-engine` demos and
tests.
# Generating Testbeds
The testbeds are not painstakingly created. They are generated based on
the `Bedfile`. To generate or regenerate testbeds, first install the
`testbeds` gem:
$ gem install testbeds
... and then run:
$ generate-testbeds
Do _not_ use `bundle exec` for this. Bundler messes with the load paths,
which is fine for a single `Gemfile` but `testbeds` requires multiple
`Gemfile`s -- one for each testbed app.