Sha256: b664418cb3288861e0a38012870402957f08e59cbf5ea82a917a8054ef3c28ac
Contents?: true
Size: 752 Bytes
Versions: 58
Compression:
Stored size: 752 Bytes
Contents
require 'spec_helper' module Appstats describe TestObject do before(:each) do @obj = Appstats::TestObject.new end describe "#initialize" do it "should set name to nil" do @obj.name.should == nil end it "should set on constructor" do obj = Appstats::TestObject.new(:name => 'a') obj.name.should == 'a' end end describe "#to_s" do it "should support nil" do obj = Appstats::TestObject.new obj.to_s.should == "NILL" obj.name = "" obj.to_s.should == "[]" end it "should display the name" do Appstats::TestObject.new(:name => 'x').to_s.should == '[x]' end end end end
Version data entries
58 entries across 58 versions & 1 rubygems