Sha256: f419d50e77d018947d679ec12e9079ef19f7cf42601b26723e1f100855877bd5

Contents?: true

Size: 502 Bytes

Versions: 29

Compression:

Stored size: 502 Bytes

Contents

require 'spec_helper'

describe Object do
  
  before(:each) do
    @object = Object.new
  end
  
  describe "exclaim" do
    it "delegates to puts" do
      @object.should_receive(:puts).once.with :bla
      
      @object.exclaim :bla
    end
  end
  
  describe "timed_exclaim" do
    it "should exclaim right" do
      Time.stub! :now => Time.parse('07-03-1977 12:34:56')
      @object.should_receive(:exclaim).once.with "12:34:56: bla"
      
      @object.timed_exclaim 'bla'
    end
  end
  
end

Version data entries

29 entries across 29 versions & 1 rubygems

Version Path
picky-1.2.0 spec/lib/extensions/object_spec.rb
picky-1.1.7 spec/lib/extensions/object_spec.rb
picky-1.1.6 spec/lib/extensions/object_spec.rb
picky-1.1.5 spec/lib/extensions/object_spec.rb
picky-1.1.4 spec/lib/extensions/object_spec.rb
picky-1.1.3 spec/lib/extensions/object_spec.rb
picky-1.1.2 spec/lib/extensions/object_spec.rb
picky-1.1.1 spec/lib/extensions/object_spec.rb
picky-1.1.0 spec/lib/extensions/object_spec.rb
picky-1.0.0 spec/lib/extensions/object_spec.rb
picky-0.12.3 spec/lib/extensions/object_spec.rb
picky-0.12.2 spec/lib/extensions/object_spec.rb
picky-0.12.1 spec/lib/extensions/object_spec.rb
picky-0.12.0 spec/lib/extensions/object_spec.rb
picky-0.11.2 spec/lib/extensions/object_spec.rb
picky-0.11.1 spec/lib/extensions/object_spec.rb
picky-0.11.0 spec/lib/extensions/object_spec.rb
picky-0.10.5 spec/lib/extensions/object_spec.rb
picky-0.10.4 spec/lib/extensions/object_spec.rb
picky-0.10.2 spec/lib/extensions/object_spec.rb