This repository was archived by the owner on Oct 19, 2018. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +3
-13
lines changed Expand file tree Collapse file tree 3 files changed +3
-13
lines changed Original file line number Diff line number Diff line change @@ -9,15 +9,11 @@ ENV['REAL_BUNDLE_GEMFILE'] = ENV['BUNDLE_GEMFILE']
9
9
require 'rspec/core/rake_task'
10
10
require 'opal/rspec/rake_task'
11
11
12
- begin
13
- require "react-rails"
14
- rescue NameError
15
- end
12
+ require 'react/react-source'
16
13
17
14
RSpec ::Core ::RakeTask . new ( 'ruby:rspec' )
18
15
19
16
Opal ::RSpec ::RakeTask . new ( 'opal:rspec' ) do |s , task |
20
- s . append_path React ::Rails ::AssetVariant . new ( addons : true ) . react_directory
21
17
s . append_path 'spec/vendor'
22
18
s . index_path = 'spec/index.html.erb'
23
19
task . timeout = 80000 if task
Original file line number Diff line number Diff line change @@ -4,26 +4,21 @@ Bundler.require
4
4
require "opal/rspec"
5
5
require "opal-jquery"
6
6
7
- begin
8
- require "react-rails"
9
- rescue NameError
10
- end
7
+ require 'react/react-source'
11
8
12
9
if Opal ::RSpec . const_defined? ( "SprocketsEnvironment" )
13
10
sprockets_env = Opal ::RSpec ::SprocketsEnvironment . new
14
11
sprockets_env . cache = Sprockets ::Cache ::FileStore . new ( "tmp" )
15
12
sprockets_env . add_spec_paths_to_sprockets
16
13
run Opal ::Server . new ( sprockets : sprockets_env ) { |s |
17
14
s . main = 'opal/rspec/sprockets_runner'
18
- s . append_path React ::Rails ::AssetVariant . new ( addons : true ) . react_directory
19
15
s . debug = false
20
16
s . append_path 'spec/vendor'
21
17
s . index_path = 'spec/index.html.erb'
22
18
}
23
19
else
24
20
run Opal ::Server . new { |s |
25
21
s . main = 'opal/rspec/sprockets_runner'
26
- s . append_path React ::Rails ::AssetVariant . new ( addons : true ) . react_directory
27
22
s . append_path 'spec'
28
23
s . append_path 'spec/vendor'
29
24
s . debug = false
Original file line number Diff line number Diff line change @@ -15,8 +15,7 @@ def ruby?
15
15
16
16
if RUBY_ENGINE == 'opal'
17
17
require File . expand_path ( '../vendor/jquery-2.2.4.min' , __FILE__ )
18
- require 'react.js'
19
- require "react-server.js"
18
+ require 'react/react-source'
20
19
require 'reactive-ruby'
21
20
require 'react/test/rspec'
22
21
You can’t perform that action at this time.
0 commit comments