File tree Expand file tree Collapse file tree 4 files changed +11
-10
lines changed Expand file tree Collapse file tree 4 files changed +11
-10
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ Rake::TestTask.new(:test) do |t|
1414 t . libs << 'test'
1515 t . pattern = ENV [ 'TEST_PATTERN' ] || 'test/**/*_test.rb'
1616 t . verbose = ENV [ 'TEST_VERBOSE' ] == '1'
17+ t . warning = true
1718end
1819
1920task default : :test
Original file line number Diff line number Diff line change 11# Set up gems listed in the Gemfile.
22ENV [ 'BUNDLE_GEMFILE' ] ||= File . expand_path ( '../../../../Gemfile' , __FILE__ )
33
4- require 'bundler/setup' if File . exists ?( ENV [ 'BUNDLE_GEMFILE' ] )
4+ require 'bundler/setup' if File . exist ?( ENV [ 'BUNDLE_GEMFILE' ] )
55$LOAD_PATH. unshift File . expand_path ( '../../../../lib' , __FILE__ )
Original file line number Diff line number Diff line change @@ -4,8 +4,8 @@ class ReactRendererTest < ActiveSupport::TestCase
44
55 test 'Server rendering class directly' do
66 result = React ::Renderer . render "TodoList" , :todos => %w{ todo1 todo2 todo3 }
7- assert_match /todo1.*todo2.*todo3/ , result
8- assert_match /data-react-checksum/ , result
7+ assert_match ( /todo1.*todo2.*todo3/ , result )
8+ assert_match ( /data-react-checksum/ , result )
99 end
1010
1111 test 'Server rendering with an already-encoded json string' do
@@ -14,8 +14,8 @@ class ReactRendererTest < ActiveSupport::TestCase
1414 end . target!
1515
1616 result = React ::Renderer . render "TodoList" , json_string
17- assert_match /todo1.*todo2.*todo3/ , result
18- assert_match /data-react-checksum/ , result
17+ assert_match ( /todo1.*todo2.*todo3/ , result )
18+ assert_match ( /data-react-checksum/ , result )
1919 end
2020
2121 test 'Rendering does not throw an exception when console log api is used' do
Original file line number Diff line number Diff line change @@ -94,14 +94,14 @@ class ViewHelperTest < ActionDispatch::IntegrationTest
9494
9595 test 'react server rendering also gets mounted on client' do
9696 visit '/server/1'
97- assert_match /data-react-class=\" TodoList\" / , page . html
98- assert_match /data-react-checksum/ , page . html
99- assert_match /yep/ , page . find ( "#status" ) . text
97+ assert_match ( /data-react-class=\" TodoList\" / , page . html )
98+ assert_match ( /data-react-checksum/ , page . html )
99+ assert_match ( /yep/ , page . find ( "#status" ) . text )
100100 end
101101
102102 test 'react server rendering does not include internal properties' do
103103 visit '/server/1'
104- assert_no_match /tag=/ , page . html
105- assert_no_match /prerender=/ , page . html
104+ assert_no_match ( /tag=/ , page . html )
105+ assert_no_match ( /prerender=/ , page . html )
106106 end
107107end
You can’t perform that action at this time.
0 commit comments