Sha256: 170d3766a2a443d61de2a7e61bf5b211ce6063a3b726967024361ec01a915f12
Contents?: true
Size: 1.42 KB
Versions: 3
Compression:
Stored size: 1.42 KB
Contents
require 'test_helper' module Vedeu module Buffers describe Refresh do let(:described) { Vedeu::Buffers::Refresh } let(:instance) { described.new(_name) } let(:_name) { 'Vedeu::Buffers::Refresh' } let(:ready) { true } before do Vedeu.stubs(:ready?).returns(ready) end describe '#initialize' do it { instance.must_be_instance_of(described) } it { instance.instance_variable_get('@name').must_equal(_name) } end describe '.by_name' do subject { described.by_name(_name) } context 'when Vedeu is not yet ready' do let(:buffer) { mock(render: '') } before do Vedeu.stubs(:trigger).with(:_clear_view_content_, _name) Vedeu.buffers.expects(:by_name).with(_name).returns(buffer) Vedeu.stubs(:trigger).with(:_refresh_border_, _name) end let(:ready) { false } it { Vedeu.expects(:trigger).with(:_clear_view_content_, _name) subject } it { Vedeu.expects(:trigger).with(:_refresh_border_, _name) subject } end context 'when Vedeu is ready' do # @todo Add more tests. # it { skip } end end describe '#by_name' do it { instance.must_respond_to(:by_name) } end end # Refresh end # Buffers end # Vedeu
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
vedeu-0.6.29 | test/lib/vedeu/buffers/refresh_test.rb |
vedeu-0.6.28 | test/lib/vedeu/buffers/refresh_test.rb |
vedeu-0.6.27 | test/lib/vedeu/buffers/refresh_test.rb |