Sha256: e85682c8273c9847d874f9956792f157f31e1ec0e5c2d2092d37183a23df3064

Contents?: true

Size: 1.36 KB

Versions: 12

Compression:

Stored size: 1.36 KB

Contents

require File.join(File.dirname(__FILE__), "spec_helper")
startup_merb

describe Merb::AbstractController, " displaying objects with templates" do

  before do
    Merb.push_path(:layout, File.dirname(__FILE__) / "controllers" / "views" / "layouts")
  end
  
  it "should allow you to pass an object" do
    dispatch_should_make_body("DisplayObject", "the index")
  end
  
  it "should allow you to pass an object with an action specified" do
    dispatch_should_make_body("DisplayObjectWithAction", "new action", :create)
  end
  
  it "should allow you to pass an object with a path specified for the template" do
    dispatch_should_make_body("DisplayObjectWithPath", "fooness")
  end
 
  it "should allow you to pass an object with a path specified for the template via opts" do
    dispatch_should_make_body("DisplayObjectWithPathViaOpts", "fooness")
  end

  it "should allow you to pass an object using multiple template root" do
    dispatch_should_make_body("DisplayObjectWithMultipleRoots", "App: new index")
  end

  it "should allow you to pass an object using multiple template root, with layout" do
    dispatch_should_make_body("DisplayObjectWithMultipleRoots", "Alt: new show", "show")
  end

  it "should allow you to pass an object using multiple template root, without layout" do
    dispatch_should_make_body("DisplayObjectWithMultipleRoots", "fooness", "another")
  end

end

Version data entries

12 entries across 6 versions & 1 rubygems

Version Path
merb-core-1.1.3 spec10/public/abstract_controller/display_spec.rb
merb-core-1.1.3 spec/public/abstract_controller/display_spec.rb
merb-core-1.1.2 spec/public/abstract_controller/display_spec.rb
merb-core-1.1.2 spec10/public/abstract_controller/display_spec.rb
merb-core-1.1.1 spec10/public/abstract_controller/display_spec.rb
merb-core-1.1.1 spec/public/abstract_controller/display_spec.rb
merb-core-1.1.0 spec/public/abstract_controller/display_spec.rb
merb-core-1.1.0 spec10/public/abstract_controller/display_spec.rb
merb-core-1.1.0.rc1 spec10/public/abstract_controller/display_spec.rb
merb-core-1.1.0.rc1 spec/public/abstract_controller/display_spec.rb
merb-core-1.1.0.pre spec/public/abstract_controller/display_spec.rb
merb-core-1.1.0.pre spec10/public/abstract_controller/display_spec.rb