Sha256: ef2b8dd130386d6b62c511ad2b2fb6a80b933f7cc16a5847836f9dc349303977

Contents?: true

Size: 554 Bytes

Versions: 34

Compression:

Stored size: 554 Bytes

Contents

require "spec_helper"

describe Intercom::UserResource do
  describe "requires_params" do
    it "raises if they are missing" do
      params = {"a" => 1, "b" => 2}
      Intercom::UserResource.requires_parameters(params, %W(a b))
      expected_message = "Missing required parameters (c)."
      proc { Intercom::UserResource.requires_parameters(params, %W(a b c)) }.must_raise ArgumentError, expected_message
      capture_exception { Intercom::UserResource.requires_parameters(params, %W(a b c)) }.message.must_equal expected_message
    end
  end
end

Version data entries

34 entries across 34 versions & 1 rubygems

Version Path
intercom-1.0.0 spec/unit/intercom/user_resource_spec.rb
intercom-0.3.0 spec/unit/intercom/user_resource_spec.rb
intercom-0.2.3 spec/unit/intercom/user_resource_spec.rb
intercom-0.2.2 spec/unit/intercom/user_resource_spec.rb
intercom-0.2.1 spec/unit/intercom/user_resource_spec.rb
intercom-0.2.0 spec/unit/intercom/user_resource_spec.rb
intercom-0.1.19 spec/unit/intercom/user_resource_spec.rb
intercom-0.1.17 spec/unit/intercom/user_resource_spec.rb
intercom-0.1.16 spec/unit/intercom/user_resource_spec.rb
intercom-0.1.15 spec/unit/intercom/user_resource_spec.rb
intercom-0.1.14 spec/unit/intercom/user_resource_spec.rb
intercom-0.1.13 spec/unit/intercom/user_resource_spec.rb
intercom-0.1.12 spec/unit/intercom/user_resource_spec.rb
intercom-0.1.11 spec/unit/intercom/user_resource_spec.rb
intercom-0.1.10 spec/unit/intercom/user_resource_spec.rb
intercom-0.1.9 spec/unit/intercom/user_resource_spec.rb
intercom-0.1.8 spec/unit/intercom/user_resource_spec.rb
intercom-0.1.7 spec/unit/intercom/user_resource_spec.rb
intercom-0.1.6 spec/unit/intercom/user_resource_spec.rb
intercom-0.1.5 spec/unit/intercom/user_resource_spec.rb