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-0.10.1 spec/lib/extensions/object_spec.rb
picky-0.10.0 spec/lib/extensions/object_spec.rb
picky-0.9.4 spec/lib/extensions/object_spec.rb
picky-0.9.3 spec/lib/extensions/object_spec.rb
picky-0.9.2 spec/lib/extensions/object_spec.rb
picky-0.9.1 spec/lib/extensions/object_spec.rb
picky-0.9.0 spec/lib/extensions/object_spec.rb
picky-0.3.0 spec/lib/extensions/object_spec.rb
picky-0.2.4 spec/lib/extensions/object_spec.rb