Skip to content

Commit

Permalink
Ruby 2.7
Browse files Browse the repository at this point in the history
  • Loading branch information
palkan committed Mar 3, 2020
1 parent 8233d1f commit 7b5e32b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions .travis.yml
Expand Up @@ -13,8 +13,12 @@ matrix:
include:
- rvm: ruby-head
gemfile: Gemfile
- rvm: 2.7
gemfile: gemfiles/rspec4rails6.gemfile
- rvm: 2.6
gemfile: gemfiles/rspec4rails6.gemfile
- rvm: 2.7
gemfile: gemfiles/rspec4rails5.gemfile
- rvm: 2.6
gemfile: gemfiles/rspec4rails5.gemfile
- rvm: 2.6
Expand Down
2 changes: 1 addition & 1 deletion lib/action_cable/testing/connection/test_case.rb
Expand Up @@ -193,7 +193,7 @@ def connect(path = ActionCable.server.config.mount_path, cookies: nil, **request

connection = self.class.connection_class.allocate
connection.singleton_class.include(TestConnection)
connection.send(:initialize, build_test_request(path, request_params))
connection.send(:initialize, build_test_request(path, **request_params))
connection.connect if connection.respond_to?(:connect)

# Only set instance variable if connected successfully
Expand Down
4 changes: 2 additions & 2 deletions lib/rspec/rails/matchers/action_cable/have_broadcasted_to.rb
Expand Up @@ -17,10 +17,10 @@ def initialize(target, channel:)
set_expected_number(:exactly, 1)
end

def with(data = nil)
def with(data = nil, &block)
@data = data
@data = @data.with_indifferent_access if @data.is_a?(Hash)
@block = Proc.new if block_given?
@block = block if block_given?
self
end

Expand Down

0 comments on commit 7b5e32b

Please sign in to comment.