This repository was archived by the owner on Oct 19, 2018. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -79,8 +79,8 @@ def as_node
79
79
def method_missing ( class_name , args = { } , &new_block )
80
80
class_name = class_name . gsub ( /__|_/ , '__' => '_' , '_' => '-' )
81
81
new_props = properties . dup
82
- new_props [ :class ] = "\
83
- #{ class_name } #{ new_props [ :class ] } #{ args . delete ( :class ) } #{ args . delete ( :className ) } \
82
+ new_props [ :className ] = "\
83
+ #{ class_name } #{ new_props [ :className ] } #{ args . delete ( :class ) } #{ args . delete ( :className ) } \
84
84
". split ( ' ' ) . uniq . join ( ' ' )
85
85
new_props . merge! args
86
86
React ::RenderingContext . replace (
Original file line number Diff line number Diff line change @@ -219,11 +219,11 @@ def render
219
219
stub_const 'Foo' , Class . new ( React ::Component ::Base )
220
220
Foo . class_eval do
221
221
def render
222
- TestMod123 ::Bar ( ) . the_class
222
+ TestMod123 ::Bar ( ) . the_class . other_class
223
223
end
224
224
end
225
225
226
- expect ( React . render_to_static_markup ( React . create_element ( Foo ) ) ) . to eq ( '<span class="the-class">a man walks into a bar</span>' )
226
+ expect ( React . render_to_static_markup ( React . create_element ( Foo ) ) ) . to eq ( '<span class="other-class the-class">a man walks into a bar</span>' )
227
227
end
228
228
229
229
it "can use the 'class' keyword for classes" do
You can’t perform that action at this time.
0 commit comments