```ruby
Rails.application.config.assets.paths << File.join(Rails.root, "spec", "javascripts")
```

Add both javascript and stylesheet paths.
user
```ruby
Rails.application.config.assets.paths << Rails.root.join("spec", "javascripts") << Rails.root.join("spec", "stylesheets")
```
assistant