Comments (6)
Too little info I'm afraid.
from dry_scaffold.
That's nice. How about you tell me what you need?
from dry_scaffold.
Okay, so instead of having the rather expected --trace, there's a --backtrace.
It appears there's a :test_unit default that does not actually set anything; which leads me to assume you have a default in your environment that I don't have in mine (Ubuntu 10.9)
Here's the offending line (inside the 'skip tests' option block):
controller_tests_path = File.join(TEST_PATHS[test_framework], FUNCTIONAL_TESTS_PATH[test_framework])
Specifically, "FUNCTIONAL_TESTS_PATH[test_framework]" is nil.
FUNCTIONAL_TESTS_PATH has the following values:
{:shoulda=>"functional", :rspec=>"controllers", :test=>"functional"}
test_framework had the following value
:test_unit
This is because:
./lib/dry_generator.rb:68: DEFAULT_TEST_FRAMEWORK = :test_unit
./lib/dry_generator.rb:92: @test_framework = options[:test_framework] || DEFAULT_TEST_FRAMEWORK
And doing a grep on your entire library for :test_unit I find:
./lib/dry_generator.rb:51: :test_unit => CONFIG_OPTIONS['test_unit'] || CONFIG_OPTIONS['tunit'] || true,
./lib/dry_generator.rb:57: :test_unit => 'test',
./lib/dry_generator.rb:63: :test_unit => 'test',
./lib/dry_generator.rb:68: DEFAULT_TEST_FRAMEWORK = :test_unit
./lib/dry_generator.rb:122: options[:test_unit] = v
./lib/dry_generator.rb:123: options[:test_framework] = :test_unit
All caused by this:
[bwilson@bwilson-laptop]~/RailsProjects/collaborate$ generate dry_scaffold fred test:string --backtrace
can't convert nil into String
/usr/lib/ruby/gems/1.8/gems/akitaonrails-dry_scaffold-0.3.3/generators/dry_scaffold/dry_scaffold_generator.rb:145:in join' /usr/lib/ruby/gems/1.8/gems/akitaonrails-dry_scaffold-0.3.3/generators /dry_scaffold/dry_scaffold_generator.rb:145:in
manifest'
/usr/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/rails_generator/base.rb:163:in record' /usr/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/rails_generator/manifest.rb:21:in
initialize'
/usr/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/rails_generator/base.rb:163:in new' /usr/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/rails_generator/base.rb:163:in
record'
/usr/lib/ruby/gems/1.8/gems/akitaonrails-dry_scaffold-0.3.3/generators/dry_scaffold/dry_scaffold_generator.rb:132:in manifest' /usr/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/rails_generator/commands.rb:42:in
invoke!'
/usr/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/rails_generator/scripts/../scripts.rb:31:in run' /usr/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/commands/generate.rb:6 /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in
gem_original_require'
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
./script//generate:3
So, is that enough for you?
from dry_scaffold.
When I add the --rspec to the command, it works fine. However, the examples you provide suggest explicitly calling out a test framework is optional; with the default being the broken test_unit.
Also, I tried setting the test framework in the scaffold.yml; with no love.
from dry_scaffold.
Good info and ellaboration, thanks. Yea that's not good. I noticed I broke something while fixing something other, and so far had no spare-time to look at it. These issue reportings is bulking up though, so something must happen soon. If you got time it would be great if you could come up with a fast patch that I can pull in - otherwise this will have to wait until I'm done with my current achievements (current project with a upcoming deadline - and related open-source work). Sorry for being a bad maintainer lately. =|
from dry_scaffold.
Sorry, I don't use Git; so it would take me longer to figure out how to use it than for you to set FUNCTIONAL_TESTS_PATH[:test_unit] when you set the other values. I mean, it is a constant, its a default setting, and it isn't set.
from dry_scaffold.
Related Issues (20)
- It looks like mocha is a dependancy - that's not clear in the docs HOT 2
- config/scaffold.yml doesn't seem to be honoring... HOT 3
- Use inherited_resources paths HOT 1
- Namespace support
- Does not create route HOT 1
- Shoulda: The redirection assertions are not working the newest versions of shoulda because the API changed HOT 1
- Formtastic gem is no longer hosted on github HOT 1
- Generating a dry_scaffold with versions 0.3.6 or 0.3.7 you get a non working scaffold! HOT 7
- @resource and @collection throw errors in views HOT 1
- Generate links for actions in _actions only
- i18n of table & page headings, attribute names, links and buttons HOT 1
- Any plans for creating a similar project to support rails 3? ;) HOT 2
- undefined method `total_pages' HOT 1
- build_object reads wrong option
- rspec has not any_instance HOT 1
- In latest source code from github the --fgirl option is ignored and the factories are not generated HOT 1
- --skip-resourceful doesn't
- Factories only created sporadically
- rais3 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dry_scaffold.