Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Done with layout and routes tutorial.
- Loading branch information
1 parent
2e6c72b
commit 83e5bb6
Showing
5 changed files
with
53 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#Autotest.add_hook :initialize do |autotest| | ||
#autotest.add_mapping(%r%^spec/(requests)/.*rb$%) do |filename, _| | ||
#filename | ||
#end | ||
#end | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,54 +1,73 @@ | ||
require 'spec_helper' | ||
|
||
describe ProductsController do | ||
render_views | ||
|
||
before(:each) do | ||
@base_title = "Salamander Server | " | ||
end | ||
|
||
describe "GET 'index'" do | ||
it "should be successful" do | ||
get 'index' | ||
response.should be_success | ||
end | ||
end | ||
|
||
describe "GET 'show'" do | ||
it "should be successful" do | ||
get 'show' | ||
response.should be_success | ||
end | ||
it "should have the right title" do | ||
get 'index' | ||
response.should have_selector("title", | ||
:content => @base_title + "Products") | ||
end | ||
|
||
end | ||
|
||
# describe "GET 'show'" do | ||
# it "should be successful" do | ||
# get 'show' | ||
# response.should be_success | ||
# end | ||
# end | ||
|
||
describe "GET 'new'" do | ||
it "should be successful" do | ||
get 'new' | ||
response.should be_success | ||
end | ||
end | ||
|
||
describe "GET 'edit'" do | ||
it "should be successful" do | ||
get 'edit' | ||
response.should be_success | ||
end | ||
it "should have the right title" do | ||
get 'new' | ||
response.should have_selector("title", | ||
:content => @base_title + "New Product") | ||
end | ||
|
||
end | ||
|
||
# describe "GET 'edit'" do | ||
# it "should be successful" do | ||
# get 'edit' | ||
# response.should be_success | ||
# end | ||
# end | ||
|
||
describe "GET 'create'" do | ||
it "should be successful" do | ||
get 'create' | ||
response.should be_success | ||
end | ||
end | ||
|
||
describe "GET 'update'" do | ||
it "should be successful" do | ||
get 'update' | ||
response.should be_success | ||
end | ||
end | ||
# describe "GET 'update'" do | ||
# it "should be successful" do | ||
# get 'update' | ||
# response.should be_success | ||
# end | ||
# end | ||
|
||
describe "GET 'destroy'" do | ||
it "should be successful" do | ||
get 'destroy' | ||
response.should be_success | ||
end | ||
end | ||
# describe "GET 'destroy'" do | ||
# it "should be successful" do | ||
# get 'destroy' | ||
# response.should be_success | ||
# end | ||
# end | ||
|
||
end |