+ describe '#initialize' do
+ it "should give an error if not given an original string" do
+ # Label.new.should raise_error(ArgumentError)
+ expect {Label.new}.to raise_error(ArgumentError)
+ end
+
+ it "should create a copy of the original as the processed string" do
+ test_label = "Test label"
+ l1 = Label.new test_label
+ l1.original.should == test_label
+ end
+
+ it "should tidy the processed string if asked" do
+ test_label = "testingLabeller string, he_pontificated"
+ l1 = Label.new test_label.dup, true
+ l2 = Label.new test_label.dup
+ l2.split.downcase.stem
+ l1.processed.should == l2.processed
+ end
+ end # initialze
+