Sha256: 9e6bc975e8392fef172b7996157037154e0c7f9032ac897107f1c6e8730c11ff

Contents?: true

Size: 505 Bytes

Versions: 1

Compression:

Stored size: 505 Bytes

Contents

require 'spec_helper'

describe Likeable::OhmAdapter do
  let(:klass) { Class.new }

  before do
    Likeable.adapter = Likeable::OhmAdapter
  end

  after do
    default_adapter!
  end

  it "finds one by passing the id to find" do
    klass.should_receive(:[]).with(42)
    Likeable.find_one(klass, 42)
  end

  it "finds many by passing the ids array find" do
    klass.should_receive(:[]).with(1).ordered
    klass.should_receive(:[]).with(42).ordered
    Likeable.find_many(klass, [1, 42])
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
likeable-0.1.2 spec/likeable/adapters/ohm_adapter_spec.rb