opal-rspec does not currently have a means to change the spec directory location, which you really need to do if you are going to have mixed opal and regular (server) ruby code testing.
The following assumes normal specs will go into the the
spec directory, and opal specs will go into
To get this to work, you have to change the
Opal::Server path to end with
spec-opal instead of
spec which is what opal-rspec normally does. Then you have to change the Opal::Server main file (the sprockets_runner.rb.erb) file to be a copy which pulls in your specs.
In your rake file do this: