elabs/front_end_testing — Issue #1: Javascript tests not running under WEBKIT environment
Author: abepetrillo
Created: 2012-03-07 17:18:05+00:00
State: open

Trying to run the javascript specs (on the javascript branch):

```bash
bundle exec evergreen run
You did not specify how you would like Rails to report deprecation notices for your WEBKIT environment, please set config.active_support.deprecation to :log, :notify or :stderr at config/environments/WEBKIT.rb

FFFFFFF

Failed: DistilleryMenu .changed() fetches the selected distillery's whiskies with Ajax.
Error: wasNotCalled does not take arguments in http://127.0.0.1:56480/jasmine/jasmine.js (line 1276)
in :

Failed: DistilleryMenu .whiskies_path() includes the distillery id.
Error: Expected a spy, but got '/distilleries/45/whiskies.json'. in http://127.0.0.1:56480/jasmine/jasmine.js (line 1329)
in :

Failed: DistilleryMenu .update_whiskies() shows the name of each whisky in the list.
Expected 1 to equal 1.
in :

Failed: RegionMenu .changed() fetches the selected region's distilleries with Ajax.
Error: wasNotCalled does not take arguments in http://127.0.0.1:56480/jasmine/jasmine.js (line 1276)
in :

Failed: RegionMenu .distilleries_path() includes the region id.
Error: Expected a spy, but got '/regions/23/distilleries.json'. in http://127.0.0.1:56480/jasmine/jasmine.js (line 1329)
in :

Failed: RegionMenu .update_distilleries() adds a blank option as the first distillery.
Expected '' to equal ''.
in :

Failed: RegionMenu .update_distilleries() adds options for each distillery, with the distillery id as the value.
Expected 1 to equal 1.
in :

Finished in 6.05 seconds
7 examples, 7 failures
```
And the spec to run the tests:
```bash
bundle exec rake spec:javascripts
rake aborted!
Don't know how to build task 'spec:javascripts'

(See full trace by running task with --trace)
```

I've been trying to get capybara-webkit working with evergreen with no success. The mailing list is unresponsive and I've yet to see a working implementation/example of this combination working. Not sure if it's my dev environment... but I can generate an example app which replicated the following quite easily:
```bash
Expected 1 to equal 1.
```

Any help on this would be greatly appreciated.