Sha256: d0176eca90ae8cf276d118edf4888276d93c10f35d4dbd171935bf2fc08c5415
Contents?: true
Size: 883 Bytes
Versions: 1
Compression:
Stored size: 883 Bytes
Contents
# encoding: utf-8 require 'spec_helper' describe Relation::Proxy, '#respond_to?' do subject { object.respond_to?(method) } let(:object) { described_class.new(relation) } let(:described_class) { Class.new(Relation) } let(:relation) { Relation.new([[:id, Integer]], body) } let(:body) { [[1], [2]] } before do described_class.class_eval do include Relation::Proxy def initialize(relation) @relation = relation end end end context 'with a known method in the proxy' do let(:method) { :header } it { should be(true) } end context 'with a known method in the relation' do let(:method) { :each } it { should be(true) } end context 'with an unknown method' do let(:method) { :unknown } it { should be(false) } end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
axiom-0.1.1 | spec/unit/axiom/relation/proxy/respond_to_predicate_spec.rb |