Sha256: 286ae251c547395fb084447551972966a7c2b31355f35a8723fa576895b3d99a

Contents?: true

Size: 872 Bytes

Versions: 4

Compression:

Stored size: 872 Bytes

Contents

shared_examples_for "object that expects single Hash argument" do
  it "raises ArgumentError when no option provided" do
    expect {
      subject.send(method)
    }.to raise_error(ArgumentError)
  end

  it "raises ArgumentError when nil provided" do
    expect {
      subject.send(method)
    }.to raise_error(ArgumentError)
  end

  it "raises ArgumentError when [] provided" do
    expect {
      subject.send(method)
    }.to raise_error(ArgumentError)
  end
  it "raises ArgumentError when FixNum provided" do
    expect {
      subject.send(method)
    }.to raise_error(ArgumentError)
  end
  it "raises ArgumentError when string provided" do
    expect {
      subject.send(method)
    }.to raise_error(ArgumentError)
  end
  it "raises ArgumentError when symbol provided" do
    expect {
      subject.send(method)
    }.to raise_error(ArgumentError)
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
flickrmocks-0.9.2 spec/shared_examples/hash_argument.rb
flickrmocks-0.9.1 spec/shared_examples/hash_argument.rb
flickrmocks-0.9.0 spec/shared_examples/hash_argument.rb
flickrmocks-0.8.15 spec/shared_examples/hash_argument.rb