Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

exceptions aren't raised with the proper caller stack via rspec #43

Open
inspire22 opened this issue Jul 28, 2010 · 0 comments
Open

exceptions aren't raised with the proper caller stack via rspec #43

inspire22 opened this issue Jul 28, 2010 · 0 comments

Comments

@inspire22
Copy link

Not sure exactly if this is machinist's fault, but thought I'd report it.

Via console:
ree-1.8.7-2010.02 > Topic.make!
NameError: uninitialized constant User::Cache
from /Users/inspire/Dropbox/newap/app/models/user.rb:129:in _callback_after_133' from /Users/inspire/.rvm/gems/ree-1.8.7-2010.02/gems/machinist-2.0.0.beta2/lib/machinist/active_record/blueprint.rb:33:invalue'
from /Users/inspire/.rvm/gems/ree-1.8.7-2010.02/gems/machinist-2.0.0.beta2/lib/machinist/active_record/blueprint.rb:33:in outside_transaction' from /Users/inspire/.rvm/gems/ree-1.8.7-2010.02/gems/machinist-2.0.0.beta2/lib/machinist/shop.rb:43:inbuy'
from /Users/inspire/.rvm/gems/ree-1.8.7-2010.02/gems/machinist-2.0.0.beta2/lib/machinist/machinable.rb:55:in make!' from /Users/inspire/.rvm/gems/ree-1.8.7-2010.02/gems/machinist-2.0.0.beta2/lib/machinist/machinable.rb:94:indecode_args_to_make'
from /Users/inspire/.rvm/gems/ree-1.8.7-2010.02/gems/machinist-2.0.0.beta2/lib/machinist/machinable.rb:53:in `make!'
from (irb):21

Via Rspec:

  1. Model tests requires new topics to have a board
    Failure/Error: t = Topic.new :user => User.make!, :title => "hello world"
    uninitialized constant User::Cache

    /Users/inspire/.rvm/gems/ree-1.8.7-2010.02/gems/machinist-2.0.0.beta2/lib/machinist/active_record/blueprint.rb:33:in `value'

    /Users/inspire/.rvm/gems/ree-1.8.7-2010.02/gems/machinist-2.0.0.beta2/lib/machinist/active_record/blueprint.rb:33:in`outside_transaction'

    /Users/inspire/.rvm/gems/ree-1.8.7-2010.02/gems/machinist-2.0.0.beta2/lib/machinist/shop.rb:43:in `buy'

    /Users/inspire/.rvm/gems/ree-1.8.7-2010.02/gems/machinist-2.0.0.beta2/lib/machinist/machinable.rb:55:in`make!'

    /Users/inspire/.rvm/gems/ree-1.8.7-2010.02/gems/machinist-2.0.0.beta2/lib/machinist/machinable.rb:94:in `decode_args_to_make'

    /Users/inspire/.rvm/gems/ree-1.8.7-2010.02/gems/machinist-2.0.0.beta2/lib/machinist/machinable.rb:53:in`make!'

    ./spec/models/model_spec.rb:22

If it seems like its prob not machinist's fault, let me know.

BTW - you're aware of dm-sweatshop, right? They were inspired by you but added Model.pick, which picked from the currently generated models of that type. Sounds like your caching system acts similar now, but that format made a bit more sense to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant