1 require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
3 describe FeaturesController do
7 @controller.class.skip_before_filter :start_transaction
8 @controller.class.skip_after_filter :end_transaction
10 #Delete this example and add some real ones
11 it "should use FeaturesController" do
12 controller.should be_an_instance_of(FeaturesController)
15 describe "GET 'show'" do
17 get 'show', :dir_name => features(:not_permit).dir_name
18 assigns[:feature].should be_blank
19 response.should render_template("public/404.html")
22 it "404 error(mobile)" do
23 request.user_agent = "SoftBank/1.0/940SH/SHJ001/SN000000000000000 Browser/NetFront/3.5 Profile/MIDP-2.0 Configuration/CLDC-1.1"
24 get 'show', :dir_name => features(:not_permit).dir_name
25 assigns[:feature].should be_blank
26 response.should render_template("public/404_mobile.html")
30 get 'show', :dir_name => features(:permit).dir_name
31 assigns[:feature].should_not be_blank
32 assigns[:products].should_not be_nil
33 response.should render_template("features/show.html.erb")
37 get 'show', :dir_name => features(:free).dir_name
38 assigns[:feature].should_not be_blank
39 assigns[:products].should be_nil
40 response.should render_template("features/show.html.erb")