Sha256: fe7852be779744e0f27f586229018d0852b18c8fe0358037e98456b71a61a256
Contents?: true
Size: 899 Bytes
Versions: 1
Compression:
Stored size: 899 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.0 | spec/unit/axiom/relation/proxy/respond_to_predicate_spec.rb |