Sha256: dca2c8c393dd65ad1d0fa0c575b11180caf3d57a0f3d976b581d6bdb0f49c7d9

Contents?: true

Size: 712 Bytes

Versions: 4

Compression:

Stored size: 712 Bytes

Contents

rspec_filter 'respond_to' do
  # arity + splat related in opal (more related to Method#arity than arity checking)
  filter('expect(...).to respond_to(:sym).with(1).argument passes if target responds to any number of arguments').unless { at_least_opal_0_10? }
  filter('expect(...).to respond_to(:sym).with(2).arguments passes if target responds to one or more arguments').unless { at_least_opal_0_10? }
  filter('expect(...).not_to respond_to(:sym).with(1).argument fails if target responds to :sym with any number of args').unless { at_least_opal_0_10? }
  filter('expect(...).not_to respond_to(:sym).with(2).arguments fails if target responds to :sym with one or more args').unless { at_least_opal_0_10? }
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
opal-rspec-0.6.2 spec/rspec/expectations/filter/bugs/respond_to.rb
opal-rspec-0.6.1 spec/rspec/expectations/filter/bugs/respond_to.rb
opal-rspec-0.6.0 spec/rspec/expectations/filter/bugs/respond_to.rb
opal-rspec-0.6.0.beta1 spec/rspec/expectations/filter/bugs/respond_to.rb