Sha256: f1a4c2879fb499d9f282bf3992d9b5d7ce7f0f461c197efc9196fdf0e579217b
Contents?: true
Size: 1.05 KB
Versions: 3
Compression:
Stored size: 1.05 KB
Contents
require File.dirname(__FILE__) + '/../spec_helper' describe Daywalker::DynamicFinderMatch do describe 'all by valid attributes (state and district number)' do subject { Daywalker::DynamicFinderMatch.new(:all_by_state_and_district) } specify 'should have :all finder' do subject.finder.should == :all end specify 'should have attributes named [:state, :district]' do subject.attribute_names.should == [:state, :district] end specify { should be_a_match } end describe 'finding all by invalid attributes (foo and bar)' do subject { Daywalker::DynamicFinderMatch.new(:all_by_foo_and_bar) } specify { should_not be_a_match } end describe 'finding unique by valid attrribute (govtrack_id)' do subject { Daywalker::DynamicFinderMatch.new(:unique_by_govtrack_id) } specify { should be_a_match } specify 'should have :govtrack_id attribute' do subject.attribute_names.should == [:govtrack_id] end specify 'should have :unique finder' do subject.finder.should == :unique end end end
Version data entries
3 entries across 3 versions & 1 rubygems