Skip to content

Commit

Permalink
Tiny fixes to ignore sqlite3 test files and warnings (#537)
Browse files Browse the repository at this point in the history
* Ignore "test.sqlite3-shm", "test.sqlite3-wal" files

Generated by rails/rails#49349

* Fix warning: `*' interpreted as argument prefix

```
app/models/concerns/turbo/broadcastable.rb:297: warning: `*' interpreted as argument prefix
```

* Fix warning: assigned but unused variable - board

```
test/streams/broadcastable_test.rb:304: warning: assigned but unused variable - board
```
  • Loading branch information
zzak authored Jan 1, 2024
1 parent 0f00575 commit b91f0cf
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
*.gem
/node_modules
Gemfile.lock

# Generated by rails/rails#49349
*.sqlite3-shm
*.sqlite3-wal
2 changes: 1 addition & 1 deletion app/models/concerns/turbo/broadcastable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ def broadcast_prepend(target: broadcast_target_default, **rendering)
end

def broadcast_refresh_to(*streamables)
Turbo::StreamsChannel.broadcast_refresh_to *streamables unless suppressed_turbo_broadcasts?
Turbo::StreamsChannel.broadcast_refresh_to(*streamables) unless suppressed_turbo_broadcasts?
end

def broadcast_refresh
Expand Down
2 changes: 1 addition & 1 deletion test/streams/broadcastable_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ class Turbo::BroadcastableBoardTest < ActionCable::Channel::TestCase
test "creating a board broadcasts refreshes to a channel using models plural name when creating" do
assert_broadcast_on "boards", turbo_stream_action_tag("refresh") do
perform_enqueued_jobs do
board = Board.create!(name: "Board")
Board.create!(name: "Board")
Turbo::StreamsChannel.refresh_debouncer_for(["boards"]).wait
end
end
Expand Down

0 comments on commit b91f0cf

Please sign in to comment.