Skip to content
This repository was archived by the owner on Oct 19, 2018. It is now read-only.

Commit 4604454

Browse files
committed
Fix mounted? test
1 parent e9e520e commit 4604454

File tree

1 file changed

+2
-11
lines changed

1 file changed

+2
-11
lines changed

spec/component_spec.rb

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -511,22 +511,13 @@ def render
511511
Foo.class_eval do
512512
include React::Component
513513

514-
define_state(:mounted) { false }
515-
after_mount :verify
516-
517-
def verify
518-
if self.mounted?
519-
self.mounted = true
520-
end
521-
end
522-
523514
def render
524515
React.create_element("div")
525516
end
526517
end
527518

528-
element = renderToDocument(Foo)
529-
expect(element.state.mounted).to eq(true)
519+
component = renderToDocument(Foo)
520+
expect(component.mounted?).to eq(true)
530521
end
531522
end
532523
end

0 commit comments

Comments
 (0)