twitter-status-bot/.gems/gems/naught-1.0.0/spec/blackhole_spec.rb

17 lines
344 B
Ruby
Raw Normal View History

2014-09-03 08:49:59 +00:00
require 'spec_helper'
describe 'black hole null object' do
subject(:null) { null_class.new }
let(:null_class) do
Naught.build do |b|
b.black_hole
end
end
it 'returns self from arbitray method calls' do
expect(null.info).to be(null)
expect(null.foobaz).to be(null)
expect(null << 'bar').to be(null)
end
end