Giter Site home page Giter Site logo

Comments (6)

grimen avatar grimen commented on May 14, 2024

Too little info I'm afraid.

from dry_scaffold.

Merovex avatar Merovex commented on May 14, 2024

That's nice. How about you tell me what you need?

from dry_scaffold.

Merovex avatar Merovex commented on May 14, 2024

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:inmanifest'
/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:ininitialize'
/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:inrecord'
/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:ininvoke!'
/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:ingem_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.

Merovex avatar Merovex commented on May 14, 2024

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.

grimen avatar grimen commented on May 14, 2024

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.

Merovex avatar Merovex commented on May 14, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.