Build broken + unconventional naming now broken

5 views
Skip to first unread message

tomtt

unread,
Sep 28, 2009, 8:41:03 AM9/28/09
to resources_controller


The build seems to be broken, am I doing something wrong?

Here is why I'm asking: the recent epic update to fix 2-3-stable
compatibility (lots of thanks for that one) seems to have broken an
app I was working on and I was trying to write a spec to cover my
case. What's happening is that I have a non standard route to allow a
URL like /person/elmo (as opposed to /people/elmo). This is done in my
routes like so:
map.resources :people, :as => "person", :except => [:index]

This was working before, but now I get the 'Can't get singleton
resource from class Person. You have have probably done something
like' error message when requesting /person/new. I have dabbled with
trying map_enclosing_resource but I don't think that is the way to go.

I feel like I may be missing something obvious here, just not sure
what it might be.

Here is the log of garlic breaking for 2-3, the other versions are
fine.

>: garlic -t 2-3

Preparing target 2-3-stable (origin/2-3-stable)
Rails app for 2-3-stable exists
vendor/rails is up to date at default
vendor/plugins/resources_controller exists, and is a repo
HEAD is now at 3008e7f... Words
vendor/plugins/rspec is up to date at default
vendor/plugins/rspec-rails is up to date at default

==============================================================================
Targets: 2-3-stable
==============================================================================

------------------------------------------------------------------------------
Target: 2-3-stable (commit a43ef24, run at Mon Sep 28 13:03:32 +0100
2009)
------------------------------------------------------------------------------
(in /Users/tomtt/created/projects/externals/
resources_controller/.garlic/2-3-stable/vendor/plugins/
resources_controller)
rm -r doc/coverage
...............................................................................................................................................................................................................................................................................................................................................................................FFF............................................................................................................................................................................................F....F.....F.............................................................

1)
'InfosController (its actions) GET /account/info/new should raise
UnknownAction' FAILED
expected ActionController::UnknownAction but nothing was raised
/Users/tomtt/created/projects/externals/resources_controller/.garlic/
2-3-stable/vendor/plugins/rspec/lib/spec/expectations/fail_with.rb:
41:in `fail_with'
/Users/tomtt/created/projects/externals/resources_controller/.garlic/
2-3-stable/vendor/plugins/rspec/lib/spec/expectations/handler.rb:21:in
`handle_matcher'
/Users/tomtt/created/projects/externals/resources_controller/.garlic/
2-3-stable/vendor/plugins/rspec/lib/spec/expectations/extensions/
kernel.rb:27:in `should'
./spec/controllers/infos_controller_spec.rb:61:
/Users/tomtt/created/projects/externals/resources_controller/.garlic/
2-3-stable/vendor/plugins/rspec/lib/spec/example/example_methods.rb:
40:in `instance_eval'
/Users/tomtt/created/projects/externals/resources_controller/.garlic/
2-3-stable/vendor/plugins/rspec/lib/spec/example/example_methods.rb:
40:in `execute'
/Users/tomtt/created/projects/externals/resources_controller/.garlic/
2-3-stable/vendor/plugins/rspec/lib/spec/example/example_methods.rb:
37:in `execute'
/Users/tomtt/created/projects/externals/resources_controller/.garlic/
2-3-stable/vendor/plugins/rspec/lib/spec/example/
example_group_methods.rb:214:in `run_examples'
/Users/tomtt/created/projects/externals/resources_controller/.garlic/
2-3-stable/vendor/plugins/rspec/lib/spec/example/
example_group_methods.rb:212:in `each'
/Users/tomtt/created/projects/externals/resources_controller/.garlic/
2-3-stable/vendor/plugins/rspec/lib/spec/example/
example_group_methods.rb:212:in `run_examples'
/Users/tomtt/created/projects/externals/resources_controller/.garlic/
2-3-stable/vendor/plugins/rspec/lib/spec/example/
example_group_methods.rb:103:in `run'
/Users/tomtt/created/projects/externals/resources_controller/.garlic/
2-3-stable/vendor/plugins/rspec/lib/spec/runner/
example_group_runner.rb:23:in `run'
/Users/tomtt/created/projects/externals/resources_controller/.garlic/
2-3-stable/vendor/plugins/rspec/lib/spec/runner/
example_group_runner.rb:22:in `each'
/Users/tomtt/created/projects/externals/resources_controller/.garlic/
2-3-stable/vendor/plugins/rspec/lib/spec/runner/
example_group_runner.rb:22:in `run'
/Users/tomtt/created/projects/externals/resources_controller/.garlic/
2-3-stable/vendor/plugins/rspec/lib/spec/runner/options.rb:128:in
`run_examples'
/Users/tomtt/created/projects/externals/resources_controller/.garlic/
2-3-stable/vendor/plugins/rspec/lib/spec/runner/command_line.rb:9:in
`run'

2)
'InfosController (its actions) POST /account/info should raise
UnknownAction' FAILED
expected ActionController::UnknownAction but nothing was raised
/Users/tomtt/created/projects/externals/resources_controller/.garlic/
2-3-stable/vendor/plugins/rspec/lib/spec/expectations/fail_with.rb:
41:in `fail_with'
/Users/tomtt/created/projects/externals/resources_controller/.garlic/
2-3-stable/vendor/plugins/rspec/lib/spec/expectations/handler.rb:21:in
`handle_matcher'
/Users/tomtt/created/projects/externals/resources_controller/.garlic/
2-3-stable/vendor/plugins/rspec/lib/spec/expectations/extensions/
kernel.rb:27:in `should'
./spec/controllers/infos_controller_spec.rb:65:
/Users/tomtt/created/projects/externals/resources_controller/.garlic/
2-3-stable/vendor/plugins/rspec/lib/spec/example/example_methods.rb:
40:in `instance_eval'
/Users/tomtt/created/projects/externals/resources_controller/.garlic/
2-3-stable/vendor/plugins/rspec/lib/spec/example/example_methods.rb:
40:in `execute'
/Users/tomtt/created/projects/externals/resources_controller/.garlic/
2-3-stable/vendor/plugins/rspec/lib/spec/example/example_methods.rb:
37:in `execute'
/Users/tomtt/created/projects/externals/resources_controller/.garlic/
2-3-stable/vendor/plugins/rspec/lib/spec/example/
example_group_methods.rb:214:in `run_examples'
/Users/tomtt/created/projects/externals/resources_controller/.garlic/
2-3-stable/vendor/plugins/rspec/lib/spec/example/
example_group_methods.rb:212:in `each'
/Users/tomtt/created/projects/externals/resources_controller/.garlic/
2-3-stable/vendor/plugins/rspec/lib/spec/example/
example_group_methods.rb:212:in `run_examples'
/Users/tomtt/created/projects/externals/resources_controller/.garlic/
2-3-stable/vendor/plugins/rspec/lib/spec/example/
example_group_methods.rb:103:in `run'
/Users/tomtt/created/projects/externals/resources_controller/.garlic/
2-3-stable/vendor/plugins/rspec/lib/spec/runner/
example_group_runner.rb:23:in `run'
/Users/tomtt/created/projects/externals/resources_controller/.garlic/
2-3-stable/vendor/plugins/rspec/lib/spec/runner/
example_group_runner.rb:22:in `each'
/Users/tomtt/created/projects/externals/resources_controller/.garlic/
2-3-stable/vendor/plugins/rspec/lib/spec/runner/
example_group_runner.rb:22:in `run'
/Users/tomtt/created/projects/externals/resources_controller/.garlic/
2-3-stable/vendor/plugins/rspec/lib/spec/runner/options.rb:128:in
`run_examples'
/Users/tomtt/created/projects/externals/resources_controller/.garlic/
2-3-stable/vendor/plugins/rspec/lib/spec/runner/command_line.rb:9:in
`run'

3)
'InfosController (its actions) DELETE /account/info/new should raise
UnknownAction' FAILED
expected ActionController::UnknownAction but nothing was raised
/Users/tomtt/created/projects/externals/resources_controller/.garlic/
2-3-stable/vendor/plugins/rspec/lib/spec/expectations/fail_with.rb:
41:in `fail_with'
/Users/tomtt/created/projects/externals/resources_controller/.garlic/
2-3-stable/vendor/plugins/rspec/lib/spec/expectations/handler.rb:21:in
`handle_matcher'
/Users/tomtt/created/projects/externals/resources_controller/.garlic/
2-3-stable/vendor/plugins/rspec/lib/spec/expectations/extensions/
kernel.rb:27:in `should'
./spec/controllers/infos_controller_spec.rb:69:
/Users/tomtt/created/projects/externals/resources_controller/.garlic/
2-3-stable/vendor/plugins/rspec/lib/spec/example/example_methods.rb:
40:in `instance_eval'
/Users/tomtt/created/projects/externals/resources_controller/.garlic/
2-3-stable/vendor/plugins/rspec/lib/spec/example/example_methods.rb:
40:in `execute'
/Users/tomtt/created/projects/externals/resources_controller/.garlic/
2-3-stable/vendor/plugins/rspec/lib/spec/example/example_methods.rb:
37:in `execute'
/Users/tomtt/created/projects/externals/resources_controller/.garlic/
2-3-stable/vendor/plugins/rspec/lib/spec/example/
example_group_methods.rb:214:in `run_examples'
/Users/tomtt/created/projects/externals/resources_controller/.garlic/
2-3-stable/vendor/plugins/rspec/lib/spec/example/
example_group_methods.rb:212:in `each'
/Users/tomtt/created/projects/externals/resources_controller/.garlic/
2-3-stable/vendor/plugins/rspec/lib/spec/example/
example_group_methods.rb:212:in `run_examples'
/Users/tomtt/created/projects/externals/resources_controller/.garlic/
2-3-stable/vendor/plugins/rspec/lib/spec/example/
example_group_methods.rb:103:in `run'
/Users/tomtt/created/projects/externals/resources_controller/.garlic/
2-3-stable/vendor/plugins/rspec/lib/spec/runner/
example_group_runner.rb:23:in `run'
/Users/tomtt/created/projects/externals/resources_controller/.garlic/
2-3-stable/vendor/plugins/rspec/lib/spec/runner/
example_group_runner.rb:22:in `each'
/Users/tomtt/created/projects/externals/resources_controller/.garlic/
2-3-stable/vendor/plugins/rspec/lib/spec/runner/
example_group_runner.rb:22:in `run'
/Users/tomtt/created/projects/externals/resources_controller/.garlic/
2-3-stable/vendor/plugins/rspec/lib/spec/runner/options.rb:128:in
`run_examples'
/Users/tomtt/created/projects/externals/resources_controller/.garlic/
2-3-stable/vendor/plugins/rspec/lib/spec/runner/command_line.rb:9:in
`run'

4)
'UsersController handling GET /users/new should be unknown action'
FAILED
expected ActionController::UnknownAction but nothing was raised
/Users/tomtt/created/projects/externals/resources_controller/.garlic/
2-3-stable/vendor/plugins/rspec/lib/spec/expectations/fail_with.rb:
41:in `fail_with'
/Users/tomtt/created/projects/externals/resources_controller/.garlic/
2-3-stable/vendor/plugins/rspec/lib/spec/expectations/handler.rb:21:in
`handle_matcher'
/Users/tomtt/created/projects/externals/resources_controller/.garlic/
2-3-stable/vendor/plugins/rspec/lib/spec/expectations/extensions/
kernel.rb:27:in `should'
./spec/controllers/users_controller_spec.rb:188:
/Users/tomtt/created/projects/externals/resources_controller/.garlic/
2-3-stable/vendor/plugins/rspec/lib/spec/example/example_methods.rb:
40:in `instance_eval'
/Users/tomtt/created/projects/externals/resources_controller/.garlic/
2-3-stable/vendor/plugins/rspec/lib/spec/example/example_methods.rb:
40:in `execute'
/Users/tomtt/created/projects/externals/resources_controller/.garlic/
2-3-stable/vendor/plugins/rspec/lib/spec/example/example_methods.rb:
37:in `execute'
/Users/tomtt/created/projects/externals/resources_controller/.garlic/
2-3-stable/vendor/plugins/rspec/lib/spec/example/
example_group_methods.rb:214:in `run_examples'
/Users/tomtt/created/projects/externals/resources_controller/.garlic/
2-3-stable/vendor/plugins/rspec/lib/spec/example/
example_group_methods.rb:212:in `each'
/Users/tomtt/created/projects/externals/resources_controller/.garlic/
2-3-stable/vendor/plugins/rspec/lib/spec/example/
example_group_methods.rb:212:in `run_examples'
/Users/tomtt/created/projects/externals/resources_controller/.garlic/
2-3-stable/vendor/plugins/rspec/lib/spec/example/
example_group_methods.rb:103:in `run'
/Users/tomtt/created/projects/externals/resources_controller/.garlic/
2-3-stable/vendor/plugins/rspec/lib/spec/runner/
example_group_runner.rb:23:in `run'
/Users/tomtt/created/projects/externals/resources_controller/.garlic/
2-3-stable/vendor/plugins/rspec/lib/spec/runner/
example_group_runner.rb:22:in `each'
/Users/tomtt/created/projects/externals/resources_controller/.garlic/
2-3-stable/vendor/plugins/rspec/lib/spec/runner/
example_group_runner.rb:22:in `run'
/Users/tomtt/created/projects/externals/resources_controller/.garlic/
2-3-stable/vendor/plugins/rspec/lib/spec/runner/options.rb:128:in
`run_examples'
/Users/tomtt/created/projects/externals/resources_controller/.garlic/
2-3-stable/vendor/plugins/rspec/lib/spec/runner/command_line.rb:9:in
`run'

5)
'UsersController handling POST /users should be unknown action' FAILED
expected ActionController::UnknownAction but nothing was raised
/Users/tomtt/created/projects/externals/resources_controller/.garlic/
2-3-stable/vendor/plugins/rspec/lib/spec/expectations/fail_with.rb:
41:in `fail_with'
/Users/tomtt/created/projects/externals/resources_controller/.garlic/
2-3-stable/vendor/plugins/rspec/lib/spec/expectations/handler.rb:21:in
`handle_matcher'
/Users/tomtt/created/projects/externals/resources_controller/.garlic/
2-3-stable/vendor/plugins/rspec/lib/spec/expectations/extensions/
kernel.rb:27:in `should'
./spec/controllers/users_controller_spec.rb:226:
/Users/tomtt/created/projects/externals/resources_controller/.garlic/
2-3-stable/vendor/plugins/rspec/lib/spec/example/example_methods.rb:
40:in `instance_eval'
/Users/tomtt/created/projects/externals/resources_controller/.garlic/
2-3-stable/vendor/plugins/rspec/lib/spec/example/example_methods.rb:
40:in `execute'
/Users/tomtt/created/projects/externals/resources_controller/.garlic/
2-3-stable/vendor/plugins/rspec/lib/spec/example/example_methods.rb:
37:in `execute'
/Users/tomtt/created/projects/externals/resources_controller/.garlic/
2-3-stable/vendor/plugins/rspec/lib/spec/example/
example_group_methods.rb:214:in `run_examples'
/Users/tomtt/created/projects/externals/resources_controller/.garlic/
2-3-stable/vendor/plugins/rspec/lib/spec/example/
example_group_methods.rb:212:in `each'
/Users/tomtt/created/projects/externals/resources_controller/.garlic/
2-3-stable/vendor/plugins/rspec/lib/spec/example/
example_group_methods.rb:212:in `run_examples'
/Users/tomtt/created/projects/externals/resources_controller/.garlic/
2-3-stable/vendor/plugins/rspec/lib/spec/example/
example_group_methods.rb:103:in `run'
/Users/tomtt/created/projects/externals/resources_controller/.garlic/
2-3-stable/vendor/plugins/rspec/lib/spec/runner/
example_group_runner.rb:23:in `run'
/Users/tomtt/created/projects/externals/resources_controller/.garlic/
2-3-stable/vendor/plugins/rspec/lib/spec/runner/
example_group_runner.rb:22:in `each'
/Users/tomtt/created/projects/externals/resources_controller/.garlic/
2-3-stable/vendor/plugins/rspec/lib/spec/runner/
example_group_runner.rb:22:in `run'
/Users/tomtt/created/projects/externals/resources_controller/.garlic/
2-3-stable/vendor/plugins/rspec/lib/spec/runner/options.rb:128:in
`run_examples'
/Users/tomtt/created/projects/externals/resources_controller/.garlic/
2-3-stable/vendor/plugins/rspec/lib/spec/runner/command_line.rb:9:in
`run'

6)
'UsersController handling DELETE /users/dave should be unknown action'
FAILED
expected ActionController::UnknownAction but nothing was raised
/Users/tomtt/created/projects/externals/resources_controller/.garlic/
2-3-stable/vendor/plugins/rspec/lib/spec/expectations/fail_with.rb:
41:in `fail_with'
/Users/tomtt/created/projects/externals/resources_controller/.garlic/
2-3-stable/vendor/plugins/rspec/lib/spec/expectations/handler.rb:21:in
`handle_matcher'
/Users/tomtt/created/projects/externals/resources_controller/.garlic/
2-3-stable/vendor/plugins/rspec/lib/spec/expectations/extensions/
kernel.rb:27:in `should'
./spec/controllers/users_controller_spec.rb:275:
/Users/tomtt/created/projects/externals/resources_controller/.garlic/
2-3-stable/vendor/plugins/rspec/lib/spec/example/example_methods.rb:
40:in `instance_eval'
/Users/tomtt/created/projects/externals/resources_controller/.garlic/
2-3-stable/vendor/plugins/rspec/lib/spec/example/example_methods.rb:
40:in `execute'
/Users/tomtt/created/projects/externals/resources_controller/.garlic/
2-3-stable/vendor/plugins/rspec/lib/spec/example/example_methods.rb:
37:in `execute'
/Users/tomtt/created/projects/externals/resources_controller/.garlic/
2-3-stable/vendor/plugins/rspec/lib/spec/example/
example_group_methods.rb:214:in `run_examples'
/Users/tomtt/created/projects/externals/resources_controller/.garlic/
2-3-stable/vendor/plugins/rspec/lib/spec/example/
example_group_methods.rb:212:in `each'
/Users/tomtt/created/projects/externals/resources_controller/.garlic/
2-3-stable/vendor/plugins/rspec/lib/spec/example/
example_group_methods.rb:212:in `run_examples'
/Users/tomtt/created/projects/externals/resources_controller/.garlic/
2-3-stable/vendor/plugins/rspec/lib/spec/example/
example_group_methods.rb:103:in `run'
/Users/tomtt/created/projects/externals/resources_controller/.garlic/
2-3-stable/vendor/plugins/rspec/lib/spec/runner/
example_group_runner.rb:23:in `run'
/Users/tomtt/created/projects/externals/resources_controller/.garlic/
2-3-stable/vendor/plugins/rspec/lib/spec/runner/
example_group_runner.rb:22:in `each'
/Users/tomtt/created/projects/externals/resources_controller/.garlic/
2-3-stable/vendor/plugins/rspec/lib/spec/runner/
example_group_runner.rb:22:in `run'
/Users/tomtt/created/projects/externals/resources_controller/.garlic/
2-3-stable/vendor/plugins/rspec/lib/spec/runner/options.rb:128:in
`run_examples'
/Users/tomtt/created/projects/externals/resources_controller/.garlic/
2-3-stable/vendor/plugins/rspec/lib/spec/runner/command_line.rb:9:in
`run'

Finished in 5.863621 seconds

631 examples, 6 failures
+----------------------------------------------------+-------+-------
+--------+
| File | Lines | LOC
| COV |
+----------------------------------------------------+-------+-------
+--------+
|...omtt/.gem/ruby/1.8/gems/mocha-0.9.7/lib/mocha.rb | 3 | 3 |
100.0% |
|...ems/mocha-0.9.7/lib/mocha/any_instance_method.rb | 59 | 46
| 21.7% |
|.../.gem/ruby/1.8/gems/mocha-0.9.7/lib/mocha/api.rb | 173 | 51
| 31.4% |
|.../gems/mocha-0.9.7/lib/mocha/argument_iterator.rb | 21 | 16
| 25.0% |
|...8/gems/mocha-0.9.7/lib/mocha/backtrace_filter.rb | 17 | 11
| 45.5% |
|...by/1.8/gems/mocha-0.9.7/lib/mocha/cardinality.rb | 95 | 73
| 27.4% |
|...m/ruby/1.8/gems/mocha-0.9.7/lib/mocha/central.rb | 27 | 20
| 30.0% |
|...ocha-0.9.7/lib/mocha/change_state_side_effect.rb | 19 | 13
| 38.5% |
|...y/1.8/gems/mocha-0.9.7/lib/mocha/class_method.rb | 91 | 71
| 23.9% |
|.../1.8/gems/mocha-0.9.7/lib/mocha/configuration.rb | 60 | 32
| 40.6% |
|...8/gems/mocha-0.9.7/lib/mocha/exception_raiser.rb | 17 | 12
| 33.3% |
|...by/1.8/gems/mocha-0.9.7/lib/mocha/expectation.rb | 476 | 153
| 28.8% |
|.../gems/mocha-0.9.7/lib/mocha/expectation_error.rb | 15 | 10
| 40.0% |
|...8/gems/mocha-0.9.7/lib/mocha/expectation_list.rb | 50 | 36
| 36.1% |
|...-0.9.7/lib/mocha/in_state_ordering_constraint.rb | 19 | 13
| 38.5% |
|...m/ruby/1.8/gems/mocha-0.9.7/lib/mocha/inspect.rb | 67 | 53
| 60.4% |
|....8/gems/mocha-0.9.7/lib/mocha/instance_method.rb | 16 | 11
| 36.4% |
|...by/1.8/gems/mocha-0.9.7/lib/mocha/integration.rb | 38 | 28
| 92.9% |
|...s/mocha-0.9.7/lib/mocha/integration/test_unit.rb | 40 | 31
| 87.1% |
|...mocha/integration/test_unit/assertion_counter.rb | 23 | 14
| 42.9% |
|...b/mocha/integration/test_unit/gem_version_200.rb | 49 | 42
| 19.0% |
|...tegration/test_unit/gem_version_201_and_above.rb | 49 | 42
| 19.0% |
|...egration/test_unit/ruby_version_185_and_below.rb | 48 | 41
| 19.5% |
|...egration/test_unit/ruby_version_186_and_above.rb | 50 | 43
| 18.6% |
|....gem/ruby/1.8/gems/mocha-0.9.7/lib/mocha/is_a.rb | 9 | 3 |
100.0% |
|...em/ruby/1.8/gems/mocha-0.9.7/lib/mocha/logger.rb | 15 | 10
| 40.0% |
|...ruby/1.8/gems/mocha-0.9.7/lib/mocha/metaclass.rb | 13 | 10
| 60.0% |
|...1.8/gems/mocha-0.9.7/lib/mocha/method_matcher.rb | 21 | 14
| 42.9% |
|....gem/ruby/1.8/gems/mocha-0.9.7/lib/mocha/mock.rb | 200 | 89
| 29.2% |
|...m/ruby/1.8/gems/mocha-0.9.7/lib/mocha/mockery.rb | 181 | 147
| 25.2% |
|.../1.8/gems/mocha-0.9.7/lib/mocha/module_method.rb | 16 | 11
| 36.4% |
|....8/gems/mocha-0.9.7/lib/mocha/multiple_yields.rb | 20 | 13
| 38.5% |
|...gem/ruby/1.8/gems/mocha-0.9.7/lib/mocha/names.rb | 53 | 36
| 36.1% |
|...ruby/1.8/gems/mocha-0.9.7/lib/mocha/no_yields.rb | 11 | 6 |
100.0% |
|...em/ruby/1.8/gems/mocha-0.9.7/lib/mocha/object.rb | 187 | 103
| 34.0% |
|...gems/mocha-0.9.7/lib/mocha/parameter_matchers.rb | 27 | 22 |
100.0% |
|...cha-0.9.7/lib/mocha/parameter_matchers/all_of.rb | 42 | 20
| 40.0% |
|...cha-0.9.7/lib/mocha/parameter_matchers/any_of.rb | 47 | 20
| 40.0% |
|...7/lib/mocha/parameter_matchers/any_parameters.rb | 40 | 19
| 36.8% |
|...a-0.9.7/lib/mocha/parameter_matchers/anything.rb | 33 | 17
| 41.2% |
|...mocha-0.9.7/lib/mocha/parameter_matchers/base.rb | 15 | 9
| 44.4% |
|...cha-0.9.7/lib/mocha/parameter_matchers/equals.rb | 42 | 20
| 40.0% |
|....9.7/lib/mocha/parameter_matchers/has_entries.rb | 45 | 23
| 43.5% |
|...-0.9.7/lib/mocha/parameter_matchers/has_entry.rb | 57 | 24
| 33.3% |
|...ha-0.9.7/lib/mocha/parameter_matchers/has_key.rb | 42 | 20
| 40.0% |
|...-0.9.7/lib/mocha/parameter_matchers/has_value.rb | 42 | 20
| 40.0% |
|...a-0.9.7/lib/mocha/parameter_matchers/includes.rb | 40 | 20
| 40.0% |
|....9.7/lib/mocha/parameter_matchers/instance_of.rb | 42 | 20
| 40.0% |
|...mocha-0.9.7/lib/mocha/parameter_matchers/is_a.rb | 42 | 20
| 40.0% |
|...ha-0.9.7/lib/mocha/parameter_matchers/kind_of.rb | 42 | 20
| 40.0% |
|.../mocha-0.9.7/lib/mocha/parameter_matchers/not.rb | 42 | 20
| 40.0% |
|...cha-0.9.7/lib/mocha/parameter_matchers/object.rb | 15 | 11
| 63.6% |
|...0.9.7/lib/mocha/parameter_matchers/optionally.rb | 55 | 24
| 29.2% |
|...7/lib/mocha/parameter_matchers/regexp_matches.rb | 43 | 20
| 40.0% |
|....7/lib/mocha/parameter_matchers/responds_with.rb | 43 | 21
| 42.9% |
|.../lib/mocha/parameter_matchers/yaml_equivalent.rb | 43 | 21
| 42.9% |
|...gems/mocha-0.9.7/lib/mocha/parameters_matcher.rb | 37 | 28
| 32.1% |
|.../1.8/gems/mocha-0.9.7/lib/mocha/return_values.rb | 31 | 22
| 36.4% |
|.../ruby/1.8/gems/mocha-0.9.7/lib/mocha/sequence.rb | 42 | 30
| 33.3% |
|...ems/mocha-0.9.7/lib/mocha/single_return_value.rb | 17 | 11
| 45.5% |
|...y/1.8/gems/mocha-0.9.7/lib/mocha/single_yield.rb | 18 | 11
| 45.5% |
|.../1.8/gems/mocha-0.9.7/lib/mocha/state_machine.rb | 91 | 55
| 34.5% |
|...1.8/gems/mocha-0.9.7/lib/mocha/stubbing_error.rb | 16 | 10
| 40.0% |
|...s/mocha-0.9.7/lib/mocha/unexpected_invocation.rb | 18 | 13
| 30.8% |
|...8/gems/mocha-0.9.7/lib/mocha/yield_parameters.rb | 31 | 23
| 39.1% |
|...uby/1.8/gems/mocha-0.9.7/lib/mocha_standalone.rb | 2 | 2 |
100.0% |
|lib/ardes/active_record/saved.rb | 15 | 12 |
100.0% |
|lib/ardes/resources_controller.rb | 847 | 277 |
100.0% |
|lib/ardes/resources_controller/actions.rb | 150 | 84 |
100.0% |
|lib/ardes/resources_controller/helper.rb | 123 | 50 |
100.0% |
|lib/ardes/resources_controller/include_actions.rb | 39 | 25 |
100.0% |
|...ardes/resources_controller/named_route_helper.rb | 156 | 103 |
100.0% |
|...sources_controller/request_path_introspection.rb | 63 | 51 |
100.0% |
|lib/ardes/resources_controller/singleton_actions.rb | 24 | 20 |
100.0% |
|lib/ardes/resources_controller/specification.rb | 104 | 50 |
100.0% |
+----------------------------------------------------+-------+-------
+--------+
|Total | 4911 | 2595
| 52.6% |
+----------------------------------------------------+-------+-------
+--------+
52.6% 75 file(s) 4911 Lines 2595 LOC
rake aborted!
Command /opt/local/bin/ruby -I"lib" -S rcov --text-report --exclude
spec/,rcov.rb,/Users/tomtt/created/projects/externals/
resources_controller/.garlic/2-3-stable -o "doc/coverage" "/Users/
tomtt/created/projects/externals/resources_controller/.garlic/2-3-
stable/vendor/plugins/rspec/bin/spec" -- "spec/controllers/
accounts_controller_spec.rb" "spec/controllers/
addresses_controller_spec.rb" "spec/controllers/
admin_forums_controller_spec.rb" "spec/controllers/
comments_controller_spec.rb" "spec/controllers/
comments_controller_with_models_spec.rb" "spec/controllers/
forum_posts_controller_spec.rb" "spec/controllers/
forums_controller_spec.rb" "spec/controllers/infos_controller_spec.rb"
"spec/controllers/interests_controller_via_forum_spec.rb" "spec/
controllers/interests_controller_via_user_spec.rb" "spec/controllers/
owners_controller_spec.rb" "spec/controllers/resource_saved_spec.rb"
"spec/controllers/tags_controller_spec.rb" "spec/controllers/
tags_controller_via_account_info_spec.rb" "spec/controllers/
tags_controller_via_forum_post_comment_spec.rb" "spec/controllers/
tags_controller_via_forum_post_spec.rb" "spec/controllers/
tags_controller_via_forum_spec.rb" "spec/controllers/
tags_controller_via_user_address_spec.rb" "spec/controllers/
users_controller_spec.rb" "spec/lib/action_view_helper_spec.rb" "spec/
lib/bug_0001_spec.rb" "spec/lib/include_actions_spec.rb" "spec/lib/
load_enclosing_resources_spec.rb" "spec/lib/
request_path_introspection_spec.rb" "spec/lib/
resources_controller_spec.rb" "spec/models/comment_saved_spec.rb"
failed

(See full trace by running task with --trace)

target: 2-3-stable FAIL

==============================================================================

USAGE: garlic [options] [command] (try garlic --help)

Error: The following targets passed: .

The following targets FAILED: 2-3-stable.

-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~
Tom ten Thij
Unboxed Consulting, http://unboxedconsulting.com
T: +44 20 3137 2943 F: +44 20 7183 4251
-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~


Ian White

unread,
Sep 28, 2009, 1:51:35 PM9/28/09
to resources_...@googlegroups.com
>
> The build seems to be broken, am I doing something wrong?
I just ran garlic on the build and it's passing on latest 2-3-stable
for me. f95a7f8 to be exact.
I see you;re on a43ef24, could you try garlic all, and see wehat
happens?

If still fail, could you give more details about your setup?

> Here is why I'm asking: the recent epic update to fix 2-3-stable
> compatibility (lots of thanks for that one) seems to have broken an
> app I was working on and I was trying to write a spec to cover my
> case.

Was this working prior to the 'epic update'?

In any case, what happens if you try:

map_enclosing_resource :person, :segment => 'person'

or, in the people controller

resources_controller_for :person, :segment => 'person'

Cheers,
Ian

Ian White

unread,
Sep 29, 2009, 3:49:37 AM9/29/09
to resources_...@googlegroups.com
Hi Tom,

Sergei Serdyuk just emailed me with some other problems with the
latest update. These have now been documented on the rc lighthouse (http://ianwhite.lighthouseapp.com/projects/10598-resources_controller
), and fixed.

Do your problems persist with these changes in?

Cheers,
Ian

tomtt

unread,
Sep 29, 2009, 9:53:48 AM9/29/09
to resources_controller
Hi Ian,

> I see you're on a43ef24, could you try garlic all, and see what happens?

Ah yes, did not know about garlic all. This makes the tests pass
(although the build fails due to low coverage, but that's fine :) ).

> map_enclosing_resource :person, :segment => 'person'

This results in "Couldn't find Person without an ID
(ActiveRecord::RecordNotFound)" for /person/new

> resources_controller_for :person, :segment => 'person'

This works! Result! Happy times! Thanks!

I still don't understand RC enough to get exactly what it is that
those parameters do. I would like to have a look at youir presentation
but don't have keynote. Any chance you could send out a pdf export of
it?

Tom.

Ian White

unread,
Sep 29, 2009, 10:09:46 AM9/29/09
to resources_...@googlegroups.com
Hi Tom,

> Ah yes, did not know about garlic all. This makes the tests pass
> (although the build fails due to low coverage, but that's fine :) ).

Weird, I'm getting all green (inc coverage) could you tell me about
your ruby/os versions etc?

>> resources_controller_for :person, :segment => 'person'
>
> This works! Result! Happy times! Thanks!

No worries!

> I still don't understand RC enough to get exactly what it is that
> those parameters do. I would like to have a look at youir presentation
> but don't have keynote.

I really should do a HowTo for all of these weird cases.

In this case, :segment is what RC uses to figure out the resource
given the request path (ie. the first part of '/person/fred/image') In
normal rails, this will be a pluralised version of the resource name
(for keyed resources), i.e. 'people' in this case.
Because you're going unconventional, you just need to tell RC about
this.

> Any chance you could send out a pdf export of
> it?

I'll get on it. Although the preso is aimed mainly at when to use RC,
and justifying its existence

Cheers,
Ian

Ian White

unread,
Sep 29, 2009, 10:15:57 AM9/29/09
to resources_controller
The pdf version is the suck, so I've uploaded a html version as well

Ian White

unread,
Sep 29, 2009, 10:31:45 AM9/29/09
to resources_controller
> The pdf version is the suck, so I've uploaded a html version as well
Ooops, too big. A smaller, and fuzzier one, without the big animation
forthcoming
Reply all
Reply to author
Forward
0 new messages