Sha256: 30df6bc56ce97dc7ad8e8e57670de0cd7a2dd90acbcd75064f6e03d4a8532f40

Contents?: true

Size: 756 Bytes

Versions: 9

Compression:

Stored size: 756 Bytes

Contents

require 'test_helper'

class CellsModuleTest < ActiveSupport::TestCase
  context "Cells" do
    context "view_paths" do
      setup do
        @old_view_paths = Cell::Base.view_paths.clone
      end
      
      teardown do
        Cell::Base.view_paths = @old_view_paths
      end
      
      should "provide .setup" do
        Cells.setup do |c|
          c.append_view_path "/road/to/nowhere"
        end
        
        assert_equal "/road/to/nowhere", Cell::Base.view_paths.last.to_s
      end
    end
    
    should "respond to #rails3_1?" do
      if Rails::VERSION::MINOR == 0
        assert ! Cells.rails3_1?
        assert Cells.rails3_0?
      elsif
        assert Cells.rails3_1?
        assert ! Cells.rails3_0?
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
cells-3.7.0 test/cells_module_test.rb
cells-3.6.7 test/cells_module_test.rb
cells-3.6.6 test/cells_module_test.rb
cells-3.6.5 test/cells_module_test.rb
cells-3.6.4 test/cells_module_test.rb
cells-3.6.3 test/cells_module_test.rb
cells-3.6.2 test/cells_module_test.rb
cells-3.6.1 test/cells_module_test.rb
cells-3.6.0 test/cells_module_test.rb