Sha256: 6e5fa377c8ec04f668d116d0be831daa35905df9b5b3a7e12974040247ffd04e

Contents?: true

Size: 695 Bytes

Versions: 19

Compression:

Stored size: 695 Bytes

Contents

require "spec_helper"

describe Redcar::Notebook do
  describe "with no tabs" do
    class NotebookTestTab < Redcar::Tab
    end
    
    before do
      @notebook = Redcar::Notebook.new(nil)
      @app = mock
      Redcar.stub!(:app).and_return(@app)
    end
    
    it "reports its length" do
      @notebook.length.should == 0
    end
    
    it "accepts new tabs and reports them to the controller" do
      tab_result = nil
      @notebook.add_listener(:tab_added) do |tab|
        tab_result = tab
      end
      @app.should_receive(:call_on_plugins)
      
      @notebook.new_tab NotebookTestTab
      
      tab_result.should be_an_instance_of(NotebookTestTab)
    end
  end
end
    

Version data entries

19 entries across 19 versions & 2 rubygems

Version Path
redcar-0.13 plugins/application/spec/application/notebook_spec.rb
redcar-dev-0.13.5dev plugins/application/spec/application/notebook_spec.rb
redcar-dev-0.13.4dev plugins/application/spec/application/notebook_spec.rb
redcar-dev-0.13.3dev plugins/application/spec/application/notebook_spec.rb
redcar-dev-0.13.2dev plugins/application/spec/application/notebook_spec.rb
redcar-dev-0.13.1dev plugins/application/spec/application/notebook_spec.rb
redcar-0.12.1 plugins/application/spec/application/notebook_spec.rb
redcar-dev-0.13.0dev plugins/application/spec/application/notebook_spec.rb
redcar-0.12 plugins/application/spec/application/notebook_spec.rb
redcar-dev-0.12.27dev plugins/application/spec/application/notebook_spec.rb
redcar-dev-0.12.26dev plugins/application/spec/application/notebook_spec.rb
redcar-dev-0.12.25dev plugins/application/spec/application/notebook_spec.rb
redcar-dev-0.12.24dev plugins/application/spec/application/notebook_spec.rb
redcar-dev-0.12.23dev plugins/application/spec/application/notebook_spec.rb
redcar-dev-0.12.22dev plugins/application/spec/application/notebook_spec.rb
redcar-dev-0.12.21dev plugins/application/spec/application/notebook_spec.rb
redcar-dev-0.12.20dev plugins/application/spec/application/notebook_spec.rb
redcar-dev-0.12.19dev plugins/application/spec/application/notebook_spec.rb
redcar-dev-0.12.18dev plugins/application/spec/application/notebook_spec.rb