Sha256: f06ad52ae68e7f4843f2efefc33670253e01d07fc21be741e23c94925fa34138
Contents?: true
Size: 1.11 KB
Versions: 5
Compression:
Stored size: 1.11 KB
Contents
require 'spec_helper' describe ApplicationController do it "should extract controller and action" do subject.extract_controller_and_action("friendships#index").should == ['friendships', 'index'] subject.extract_controller_and_action("friendships#").should == ['friendships', ''] end it "action_any_of should work" do get :index subject.action_any_of?("bars#index").should be_false subject.action_any_of?("application#index").should be_true subject.action_any_of?("bars#index", "application#index").should be_true end it "action_state should work" do get :index subject.action_state("bars#index", "application#index").should == :chosen subject.action_state("bars#index", ["application#index", "foobars#index"]).should == :chosen subject.action_state("application#index", "tests#index").should == :active subject.action_state("application#index").should == :active end it "action_any_of should work relatively" do get :index subject.action_any_of?("#index").should be_true subject.action_any_of?("#not_index").should be_false end end
Version data entries
5 entries across 5 versions & 1 rubygems