Commit 056502a
Refactor: Move disconnect test to stream_spec.rb for better organization
Moved the "stops producing when client disconnects" test from
react_on_rails_pro_helper_spec.rb to stream_spec.rb to follow the
established architectural pattern.
Why:
- stream_spec.rb contains all streaming behavior/concurrency tests
- helper_spec.rb is for Rails integration tests, not streaming behavior
- stream_spec.rb uses cleaner setup (setup_stream_test) without Rails mocking
Changes:
- Removed test from helper_spec.rb (Rails integration test file)
- Added test to stream_spec.rb in "Component streaming concurrency" block
- Simplified test to use existing setup_stream_test helper
- Updated test to account for TEMPLATE being first write
- Test now expects ["TEMPLATE", "A1"] instead of just counting chunks
Benefits:
- Consistent with existing architecture (all concurrency tests in one place)
- Simpler test setup (no Rails mocking complexity)
- Easier to find (streaming behavior tests are in stream_spec.rb)
- Net -16 lines of code
Verified: All 21 tests in stream_spec.rb pass, including the new test.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>1 parent 3de5cb5 commit 056502a
File tree
2 files changed
+41
-57
lines changed- react_on_rails_pro/spec
- dummy/spec/helpers
- react_on_rails_pro
2 files changed
+41
-57
lines changedLines changed: 0 additions & 57 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
514 | 514 | | |
515 | 515 | | |
516 | 516 | | |
517 | | - | |
518 | | - | |
519 | | - | |
520 | | - | |
521 | | - | |
522 | | - | |
523 | | - | |
524 | | - | |
525 | | - | |
526 | | - | |
527 | | - | |
528 | | - | |
529 | | - | |
530 | | - | |
531 | | - | |
532 | | - | |
533 | | - | |
534 | | - | |
535 | | - | |
536 | | - | |
537 | | - | |
538 | | - | |
539 | | - | |
540 | | - | |
541 | | - | |
542 | | - | |
543 | | - | |
544 | | - | |
545 | | - | |
546 | | - | |
547 | | - | |
548 | | - | |
549 | | - | |
550 | | - | |
551 | | - | |
552 | | - | |
553 | | - | |
554 | | - | |
555 | | - | |
556 | | - | |
557 | | - | |
558 | | - | |
559 | | - | |
560 | | - | |
561 | | - | |
562 | | - | |
563 | | - | |
564 | | - | |
565 | | - | |
566 | | - | |
567 | | - | |
568 | | - | |
569 | | - | |
570 | | - | |
571 | | - | |
572 | | - | |
573 | | - | |
574 | 517 | | |
575 | 518 | | |
576 | 519 | | |
| |||
Lines changed: 41 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
486 | 486 | | |
487 | 487 | | |
488 | 488 | | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
489 | 530 | | |
490 | 531 | | |
0 commit comments