Sha256: 6d5dab8596dc61d138f60cd9eadca66c447a6fd192c71e9bb5c5c49605f195b5
Contents?: true
Size: 1.08 KB
Versions: 11
Compression:
Stored size: 1.08 KB
Contents
# -*- encoding : utf-8 -*- module SetPatternSpecHelper def it_generates( opts ) name = opts[:name] card = opts[:from] it "generates name '#{name}' for card '#{card.name}'" do expect(described_class.new(card).to_s).to eq(name) end end end include SetPatternSpecHelper describe Card::SetPattern do end #FIXME - these should probably be in pattern-specific specs, though that may not leave much to test in the base class :) describe Card::RightSet do it_generates :name => "author+*right", :from => Card.new( :name => "Iliad+author" ) it_generates :name => "author+*right", :from => Card.new( :name => "+author" ) end describe Card::TypeSet do it_generates :name => "Book+*type", :from => Card.new( :type => "Book" ) end describe Card::AllPlusSet do it_generates :name => "*all plus", :from => Card.new( :name => "Book+author" ) end describe Card::AllSet do it_generates :name => "*all", :from => Card.new( :type => "Book" ) end describe Card::TypePlusRightSet do it_generates :name => "Book+author+*type plus right", :from => Card.new( :name=>"Iliad+author" ) end
Version data entries
11 entries across 11 versions & 1 rubygems