Setup basic workout index action

This commit is contained in:
Andrew Tomaka 2013-08-04 20:58:01 -04:00
parent de37e811f9
commit cab5cc436e
12 changed files with 84 additions and 54 deletions

View file

@ -0,0 +1,5 @@
require 'spec_helper'
describe WorkoutsController do
end

View 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

View 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