Sha256: 8dab679bb62d674919444f58b4023d620a567c05e350d804a1cb643bb64d2304

Contents?: true

Size: 346 Bytes

Versions: 7

Compression:

Stored size: 346 Bytes

Contents

class RespondToSpecs
  def foo; end
end

describe "respond_to" do
  it "should pass if the object responds to method" do
    RespondToSpecs.new.should respond_to(:foo)
  end

  it "should fail if the object does not respond to method" do
    lambda {
      RespondToSpecs.new.should respond_to(:bar)
    }.should raise_error(Exception)
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
opal-spec-0.3.2 spec/matchers/respond_to_spec.rb
opal-spec-0.3.1 spec/matchers/respond_to_spec.rb
opal-spec-0.2.17 spec/matchers/respond_to_spec.rb
opal-spec-0.2.16 spec/matchers/respond_to_spec.rb
opal-spec-0.2.15 spec/matchers/respond_to_spec.rb
opal-spec-0.2.14 spec/matchers/respond_to_spec.rb
opal-spec-0.2.13 spec/matchers/respond_to_spec.rb