Sha256: 0cc599b5849a55e4be2c8933f2297d59a2ae7617c81344ca043876ee7071aa5c
Contents?: true
Size: 528 Bytes
Versions: 7
Compression:
Stored size: 528 Bytes
Contents
require "spec_helper" describe Sunspot::ClassSet do it "is enumerable" do class1, class2 = stub(:name => "Class1"), stub(:name => "Class2") set = described_class.new set << class1 << class2 set.to_a.should == [class1, class2] end it "replaces classes with the same name" do set = described_class.new class1 = stub(:name => "Class1") set << class1 set.to_a.should == [class1] class1_dup = stub(:name => "Class1") set << class1_dup set.to_a.should == [class1_dup] end end
Version data entries
7 entries across 7 versions & 2 rubygems