Sha256: 73d52ce7df5a4657c92edd142f1d03580428dffdcc1cc1c0d0fd6d5922181cda

Contents?: true

Size: 736 Bytes

Versions: 16

Compression:

Stored size: 736 Bytes

Contents

require File.join(File.dirname(__FILE__), "..", "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

16 entries across 16 versions & 1 rubygems

Version Path
redcar-dev-0.12.17dev plugins/application/spec/application/notebook_spec.rb
redcar-dev-0.12.16dev-java plugins/application/spec/application/notebook_spec.rb
redcar-dev-0.12.15dev-java plugins/application/spec/application/notebook_spec.rb
redcar-dev-0.12.14dev-java plugins/application/spec/application/notebook_spec.rb
redcar-dev-0.12.13dev-java plugins/application/spec/application/notebook_spec.rb
redcar-dev-0.12.12dev-java plugins/application/spec/application/notebook_spec.rb
redcar-dev-0.12.11dev-java plugins/application/spec/application/notebook_spec.rb
redcar-dev-0.12.10dev-java plugins/application/spec/application/notebook_spec.rb
redcar-dev-0.12.9dev-java plugins/application/spec/application/notebook_spec.rb
redcar-dev-0.12.8dev-java plugins/application/spec/application/notebook_spec.rb
redcar-dev-0.12.7dev-java plugins/application/spec/application/notebook_spec.rb
redcar-dev-0.12.6dev-java plugins/application/spec/application/notebook_spec.rb
redcar-dev-0.12.4dev-java plugins/application/spec/application/notebook_spec.rb
redcar-dev-0.12.3dev-java plugins/application/spec/application/notebook_spec.rb
redcar-dev-0.12.1dev-java plugins/application/spec/application/notebook_spec.rb
redcar-dev-0.12.0dev-java plugins/application/spec/application/notebook_spec.rb