Sha256: 5ca39920cc444d90b29c3fece3287ef6901e4d325362c92c8740810244dd928c
Contents?: true
Size: 735 Bytes
Versions: 1
Compression:
Stored size: 735 Bytes
Contents
require "spec_helper" module Bickle describe LengthDecorator do it "limits the output when explicitly asked" do build = mock("Build", :message => "abcd") decorator = LengthDecorator.new(build, "message" => 2) decorator.message.should == "ab" end it "applies default limits" do build = mock("Build", :state => "a" * 15, :commit => "a" * 10, :branch => "a" * 15, :message => "a" * 55) decorator = LengthDecorator.new(build) decorator.state.should == "a" * 10 decorator.commit.should == "a" * 5 decorator.branch.should == "a" * 10 decorator.message.should == "a" * 50 end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
bickle-0.0.1 | spec/length_decorator_spec.rb |