Sha256: c978611282c5501e2a1f41564f8bd0c17e4a4de247b192541a3451a985d4a69b
Contents?: true
Size: 684 Bytes
Versions: 25
Compression:
Stored size: 684 Bytes
Contents
require 'rails_helper' describe LHS::Data do before(:each) do class SomeService < LHS::Service map :test_mapping?, ->(item){ true } end end context '#respond_to?' do it 'it is true for mappings that are defined' do data = described_class.new({'campaign' => {'id' => 123}}, nil, SomeService) expect(data.respond_to?(:test_mapping?)).to be(true) end # proxy for this example is LHC::Collection which implements total it 'it is true for calls forwarded to proxy' do data = described_class.new({'items' => [{'campaign' => {'id' => 123}}]}, nil, SomeService) expect(data.respond_to?(:total)).to be(true) end end end
Version data entries
25 entries across 25 versions & 1 rubygems