Sha256: 7e6016ae390cda7add8ae628e338dc1e581e49594487943a5e5406057881ce3b

Contents?: true

Size: 574 Bytes

Versions: 2

Compression:

Stored size: 574 Bytes

Contents

require "spec_helper"

describe Herder::Model do
  it "should setup the remote site" do
    Herder::Model.user.should be == "user"
    Herder::Model.password.should be == "password"
    Herder::Model.site.should be == URI("http://localhost")
  end

  it "should inherit active resource" do
    Herder::Model.new.should be_a(ActiveResource::Base)
  end

  describe "#where" do
    it "should pass the query along to find" do
      options = {foo: :bar}
      Herder::Model.should_receive(:find).with(:all, params: options)
      Herder::Model.where(options)
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
herder-0.0.2 spec/herder/model_spec.rb
herder-0.0.1 spec/herder/model_spec.rb