Setup basic workout index action
This commit is contained in:
parent
de37e811f9
commit
cab5cc436e
12 changed files with 84 additions and 54 deletions
5
spec/controllers/workouts_controller_spec.rb
Normal file
5
spec/controllers/workouts_controller_spec.rb
Normal file
|
@ -0,0 +1,5 @@
|
|||
require 'spec_helper'
|
||||
|
||||
describe WorkoutsController do
|
||||
|
||||
end
|
7
spec/factories/workouts.rb
Normal file
7
spec/factories/workouts.rb
Normal file
|
@ -0,0 +1,7 @@
|
|||
# Read about factories at https://github.com/thoughtbot/factory_girl
|
||||
|
||||
FactoryGirl.define do
|
||||
factory :workout do
|
||||
date "2013-08-04 20:31:21"
|
||||
end
|
||||
end
|
19
spec/features/workouts_spec.rb
Normal file
19
spec/features/workouts_spec.rb
Normal file
|
@ -0,0 +1,19 @@
|
|||
require 'spec_helper'
|
||||
|
||||
describe "Workouts" do
|
||||
before :all do
|
||||
@workout = FactoryGirl.create(:workout)
|
||||
end
|
||||
|
||||
describe "GET /workouts" do
|
||||
it "should return 200" do
|
||||
visit workouts_path
|
||||
page.status_code.should be 200
|
||||
end
|
||||
|
||||
it "should return workouts" do
|
||||
visit workouts_path
|
||||
page.should have_content @workout.date
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue