Skip to content

Commit

Permalink
More house keeping to make specs more readable.
Browse files Browse the repository at this point in the history
  • Loading branch information
baphled committed Aug 5, 2010
1 parent d8fcf6b commit c0780a9
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions spec/controllers/application_controller_spec.rb
Expand Up @@ -6,21 +6,21 @@
response.should use_layout("no_sidebar")
end

context "Projects" do
context "ProjectsController" do
controller_name :projects
before(:each) do
Project.stub(:find).and_return mock_model(Project).as_null_object
end

describe "GET, new" do
it "should render the no sidebar layout" do
it "renders the no sidebar layout" do
get :new
response.should use_layout("no_sidebar")
end
end

describe "POST, create" do
it "should render the no sidebar layout" do
it "renders the no sidebar layout" do
@project = mock_model(Project).as_new_record.as_null_object
@project.stub!(:save).and_return false
Project.stub!(:new).and_return @project
Expand All @@ -29,19 +29,19 @@
end

describe "GET, edit" do
it "should render the no sidebar layout" do
it "renders the no sidebar layout" do
get :edit, {:id => 1}
end
end

describe "GET, import" do
it "should render the no sidebar layout" do
it "renders the no sidebar layout" do
get :import, {:id => 1}
end
end
end

context "Features" do
context "FeaturesController" do
controller_name :features

before(:each) do
Expand All @@ -50,38 +50,38 @@
end

describe "GET, export" do
it "should render the no sidebar layout" do
it "renders the no sidebar layout" do
get :export, {:id => 1}
end
end

describe "GET, changes" do
it "should render the no sidebar layout" do
it "renders the no sidebar layout" do
get :changes, {:id => 1}
end
end

describe "GET, merge" do
it "should render the no sidebar layout" do
it "renders the no sidebar layout" do
get :merge, {:id => 1}
end
end

describe "GET, system_merge" do
it "should render the no sidebar layout" do
it "renders the no sidebar layout" do
get :system_merge, {:id => 1}
end
end

describe "GET, source" do
it "should render the no sidebar layout" do
it "renders the no sidebar layout" do
@feature.stub!(:path).and_return "#{RAILS_ROOT}/spec/fixtures/features/tag_cloud.feature"
get :source, {:id => 1}
end
end
end

context "Parking" do
context "ParkingController" do
controller_name :parking

before(:each) do
Expand All @@ -94,7 +94,7 @@
Resource.stub!(:find).and_return @resource
end

it "should render the no sidebar layout" do
it "renders the no sidebar layout" do
get :tickets, {:resource => {:id => '1'}, :parking => {:tag => 'feature'}}
end
end
Expand Down

0 comments on commit c0780a9

Please sign in to comment.