add scaffold & bike form

This commit is contained in:
loos
2014-01-18 15:27:14 -06:00
parent b843e4024e
commit 71d2433334
29 changed files with 546 additions and 178 deletions
+15
View File
@@ -0,0 +1,15 @@
require 'spec_helper'
describe "bikes/edit" do
before(:each) do
@bike = assign(:bike, stub_model(Bike))
end
it "renders the edit bike form" do
render
# Run the generator again with the --webrat flag if you want to use webrat matchers
assert_select "form[action=?][method=?]", bike_path(@bike), "post" do
end
end
end
+15
View File
@@ -0,0 +1,15 @@
require 'spec_helper'
describe "bikes/index" do
before(:each) do
assign(:bikes, [
stub_model(Bike),
stub_model(Bike)
])
end
it "renders a list of bikes" do
render
# Run the generator again with the --webrat flag if you want to use webrat matchers
end
end
+15
View File
@@ -0,0 +1,15 @@
require 'spec_helper'
describe "bikes/new" do
before(:each) do
assign(:bike, stub_model(Bike).as_new_record)
end
it "renders new bike form" do
render
# Run the generator again with the --webrat flag if you want to use webrat matchers
assert_select "form[action=?][method=?]", bikes_path, "post" do
end
end
end
+12
View File
@@ -0,0 +1,12 @@
require 'spec_helper'
describe "bikes/show" do
before(:each) do
@bike = assign(:bike, stub_model(Bike))
end
it "renders attributes in <p>" do
render
# Run the generator again with the --webrat flag if you want to use webrat matchers
end
end