mirror of
https://github.com/fspc/bike-database.git
synced 2026-09-16 16:41:38 -04:00
add scaffold & bike form
This commit is contained in:
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user