Sha256: aa413f5beb5335e9f3ab253799efd3f3da56182c6e420e9ee512f703d76f6e02

Contents?: true

Size: 575 Bytes

Versions: 18

Compression:

Stored size: 575 Bytes

Contents

require 'rails_helper'

describe LHS::Item do

  before(:each) do
    class SomeService < LHS::Service
      endpoint ':datastore/v2/:campaign_id/feedbacks'
      endpoint ':datastore/v2/feedbacks'
    end
  end

  let(:json) do
    load_json(:feedbacks)
  end

  let(:data) do
    LHS::Data.new(json, nil, SomeService)
  end

  let(:item) do
    data[0]
  end

  context 'delegates methods to raw' do

    %w(present? blank? empty?).each do |method|
      it "delegates #{method} to raw" do
        expect(item.send(method.to_sym)).not_to be_nil
      end
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
lhs-2.2.2 spec/item/delegate_spec.rb
lhs-1.6.1 spec/item/delegate_spec.rb
lhs-2.2.1 spec/item/delegate_spec.rb
lhs-2.2.0 spec/item/delegate_spec.rb
lhs-1.6.0 spec/item/delegate_spec.rb
lhs-2.1.1 spec/item/delegate_spec.rb
lhs-2.1.0 spec/item/delegate_spec.rb
lhs-2.0.5 spec/item/delegate_spec.rb
lhs-2.0.4 spec/item/delegate_spec.rb
lhs-2.0.3 spec/item/delegate_spec.rb
lhs-2.0.2 spec/item/delegate_spec.rb
lhs-2.0.1 spec/item/delegate_spec.rb
lhs-2.0.0 spec/item/delegate_spec.rb
lhs-1.5.0 spec/item/delegate_spec.rb
lhs-1.4.0 spec/item/delegate_spec.rb
lhs-1.3.1 spec/item/delegate_spec.rb
lhs-1.3.0 spec/item/delegate_spec.rb
lhs-1.2.3 spec/item/delegate_spec.rb