Sha256: 934d087f70bd61f18a4ddd876b6ec0fad1b34850d56509fee30776837dd141e7

Contents?: true

Size: 926 Bytes

Versions: 10

Compression:

Stored size: 926 Bytes

Contents

module ApplicationTests
  class RouterTest < ActionController::TestCase
    tests MusicianController

    context "A Rails app" do
      should "allow cells to use url_helpers" do
        BassistCell.class_eval do
          def promote; render; end
        end
      
        #assert ::Cell::Rails.view_context_class._routes, "Cells::Railtie initializer wasn't invoked."
        #assert ! ::OmgController.new.respond_to?( :render_cell)
        
        get "index"
        assert_response :success
        assert_equal "Find me at <a href=\"/musician\">vd.com</a>", @response.body
      end
      
      should "allow cells to use #config" do
        
        BassistCell.class_eval do
          def provoke; render; end
        end
        
        get "promotion"
        assert_response :success
        assert_equal "That's me, naked <img alt=\"Me\" src=\"/images/me.png\" />", @response.body
      end 
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
cells-3.5.5 test/rails/router_test.rb
cells-3.5.4 test/rails/router_test.rb
cells-3.5.2 test/rails/router_test.rb
cells-3.5.1 test/rails/router_test.rb
cells-3.5.0 test/rails/router_test.rb
cells-3.5.0.beta2 test/rails/router_test.rb
cells-3.5.0.beta1 test/rails/router_test.rb
cells-3.4.4 test/rails/router_test.rb
cells-3.4.3 test/rails/router_test.rb
cells-3.4.2 test/rails/router_test.rb