Sha256: a42ca26d0ec9a33f00a7d2d8d708781b961ae2580c7ded8584082c4edbe8c9c7

Contents?: true

Size: 613 Bytes

Versions: 9

Compression:

Stored size: 613 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
    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
      @notebook.new_tab NotebookTestTab
      tab_result.should be_an_instance_of(NotebookTestTab)
    end
  end
end
    

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
redcar-0.3.4.3 plugins/application/spec/application/notebook_spec.rb
redcar-0.3.4.2 plugins/application/spec/application/notebook_spec.rb
redcar-0.3.4.1 plugins/application/spec/application/notebook_spec.rb
redcar-0.3.4 plugins/application/spec/application/notebook_spec.rb
redcar-0.3.3 plugins/application/spec/application/notebook_spec.rb
redcar-0.3.2dev plugins/application/spec/application/notebook_spec.rb
redcar-0.3.1dev plugins/application/spec/application/notebook_spec.rb
redcar-0.3.0dev plugins/application/spec/application/notebook_spec.rb
redcar-0.2.9dev plugins/application/spec/application/notebook_spec.rb