mirror of
https://github.com/fspc/bike-database.git
synced 2026-09-16 08:31:39 -04:00
LK removes autogenerated tests and fixes test and updates gems
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
require 'spec_helper'
|
||||
|
||||
describe BikesController do
|
||||
|
||||
let(:user){FactoryGirl.create(:user)}
|
||||
let(:bike){FactoryGirl.create(:bike)}
|
||||
|
||||
before :each do
|
||||
controller.stub(:current_user).and_return(user)
|
||||
controller.stub(:authenticate_user!).and_return true
|
||||
sign_in user
|
||||
end
|
||||
|
||||
describe "POST #create" do
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
require 'spec_helper'
|
||||
@@ -1,39 +0,0 @@
|
||||
require "spec_helper"
|
||||
|
||||
describe BikesController do
|
||||
describe "routing" do
|
||||
|
||||
it "routes to #index" do
|
||||
get("/bikes").should route_to("bikes#index")
|
||||
end
|
||||
|
||||
it "routes to #new" do
|
||||
get("/bikes/new").should route_to("bikes#new")
|
||||
end
|
||||
|
||||
it "routes to #show" do
|
||||
get("/bikes/1").should route_to("bikes#show", :id => "1")
|
||||
end
|
||||
|
||||
it "routes to #edit" do
|
||||
get("/bikes/1/edit").should route_to("bikes#edit", :id => "1")
|
||||
end
|
||||
|
||||
it "routes to #create" do
|
||||
post("/bikes").should route_to("bikes#create")
|
||||
end
|
||||
|
||||
it "routes to #update" do
|
||||
put("/bikes/1").should route_to("bikes#update", :id => "1")
|
||||
end
|
||||
|
||||
it "routes to #destroy" do
|
||||
delete("/bikes/1").should route_to("bikes#destroy", :id => "1")
|
||||
end
|
||||
|
||||
it "routes to #print_select" do
|
||||
get("/bikes/print_select").should route_to("bikes#print_select")
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
@@ -8,8 +8,10 @@ Dir[Rails.root.join("spec/support/**/*.rb")].each { |f| require f }
|
||||
ActiveRecord::Migration.check_pending! if defined?(ActiveRecord::Migration)
|
||||
|
||||
RSpec.configure do |config|
|
||||
config.infer_spec_type_from_file_location!
|
||||
config.fixture_path = "#{::Rails.root}/spec/fixtures"
|
||||
config.use_transactional_fixtures = true
|
||||
config.infer_base_class_for_anonymous_controllers = false
|
||||
config.include Devise::TestHelpers, type: :controller
|
||||
config.order = "random"
|
||||
end
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
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
|
||||
@@ -1,15 +0,0 @@
|
||||
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
|
||||
@@ -1,15 +0,0 @@
|
||||
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
|
||||
@@ -1,12 +0,0 @@
|
||||
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