Sha256: a4e0e73f9aa04d3d4b802ca38cd47d9b70ea7ce5b84e0b85ce78027efdd98f70
Contents?: true
Size: 1.08 KB
Versions: 2
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 described_class.new(card).to_s.should == 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
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
wagn-1.13.0 | spec/lib/card/set_pattern_spec.rb |
wagn-1.13.0.pre2 | spec/lib/card/set_pattern_spec.rb |