OK, I was able to run the selenium integration test. Unlike what I wrote earlier, I didn't have to change the test at all, but I did have to fix up the controllers. I checked, and all the changes I made are in the tutorial.
You also had "has_many :tasks" in story.rb twice. Here are the changes I made (note, this diff is backwards). diff --git a/app/controllers/stories_controller.rb b/app/controllers/ stories_con index d2b7767..f0dd368 100644 --- a/app/controllers/stories_controller.rb +++ b/app/controllers/stories_controller.rb @@ -2,8 +2,6 @@ class StoriesController < ApplicationController hobo_model_controller - auto_actions :show, :edit, :update, :destroy - - auto_actions_for :project, [:new, :create] + auto_actions :all end diff --git a/app/controllers/story_statuses_controller.rb b/app/ controllers/stor index 318bad5..a94b44f 100644 --- a/app/controllers/story_statuses_controller.rb +++ b/app/controllers/story_statuses_controller.rb @@ -2,6 +2,6 @@ class StoryStatusesController < ApplicationController hobo_model_controller - auto_actions :write_only, :new, :index + auto_actions :write_only end diff --git a/app/controllers/tasks_controller.rb b/app/controllers/ tasks_control index 7423c3b..f5a4f00 100644 --- a/app/controllers/tasks_controller.rb +++ b/app/controllers/tasks_controller.rb @@ -2,8 +2,6 @@ class TasksController < ApplicationController hobo_model_controller - auto_actions :write_only, :edit - - auto_actions_for :story, :create + auto_actions :all end diff --git a/app/models/story.rb b/app/models/story.rb index ac4b6cf..431c21e 100644 --- a/app/models/story.rb +++ b/app/models/story.rb @@ -3,6 +3,7 @@ class Story < ActiveRecord::Base hobo_model # Don't put anything above this belongs_to :project + has_many :tasks, :dependent => :destroy belongs_to :status, :class_name => "StoryStatus" On Mar 26, 9:41 am, Bryan Larsen <[email protected]> wrote: > BTW, The URL ishttp://gist.github.com/84339. > > This is awesome. > > I ran the selenium integration test that I added to the GitHub agility > project. I got about 3/4's of the way through it by making three > changes: > > adding "auto_actions_for :project, [:new, :create]" to > stories_controller > adding "auto_actions_for :story, :create" to tasks_controller > changing the line in the selenium test where it says "FIXME: better > selector" to use a better selector. :) > in this case: 'click_and_wait "css=.edit-link"' > > that got me about 3/4's of the way through. Hopefully I'll get to the > rest of it this evening. > > So so far the integration test hasn't found any divergence between the > agility tutorial and agility.git. I'm sure there are some divergences > as you claim, but our divergences our more fundamental at the > moment. :) > > To me this screams "doctest". If we merged agility.markdown and your > script -- lovely. Google doesn't know about any "shdoctest"'s. > Hopefully it wouldn't be too hard to either create shdoctest or > convert your script to ruby through the liberal use of heredocs and > backticks.... > > cheers, > Bryan > > tmorgan99 wrote: > > Hello! > > > I would like to offer a revision to the 'Agility' app, with its > > tutorial, as it appears in the Cookbook. > > > I have noticed that the Agility git repo does not co-respond to the > > result of following the tutorial. > > This is what happens in a rapidly evolving framework, but can be very > > confusing, and self defeating to new comers. > > > To this end, I propose a script that can be run as one follows along > > with the tutorial text, that can generate the app step by step. > > > Along the way, I created a kind of 'uber'-migrator, that I use as a > > front end into hobo-migration. I am able to specify many aspects of > > migration 'out in the open', and I find that leads to greater > > understanding of the process involved. > > > would like to take this further, to create an integrated tutorial > > approach worthy of the hobo framework. > > > Please run my script, as seen in the gist, and offer your feedbacks! > > gist: 84339 > > Thanks... > > == Tim > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Hobo Users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/hobousers?hl=en -~----------~----~----~----~------~----~------~--~---
