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

Undefined decorator methods in test environment #9

Closed
emilford opened this issue Jul 9, 2012 · 5 comments
Closed

Undefined decorator methods in test environment #9

emilford opened this issue Jul 9, 2012 · 5 comments

Comments

@emilford
Copy link

emilford commented Jul 9, 2012

Unless I manually include my decorators into my models, my tests (RSpec and Turnip) that utilize decorator methods fail. I'd be happy to work on this and submit a pull request if you want to give your input and point me in the right direction. Thanks.

@scomma
Copy link

scomma commented Dec 27, 2012

I'm having a slightly different problem that might be related: the unit tests are choking on calls to Rails' view helpers.

  2) ProspectDecorator#priority_icon 
     Failure/Error: subject { prospect.priority_icon }
     NoMethodError:
       undefined method `content_tag' for #<Prospect:0x007fe88bb7fe78>
     # ./app/decorators/prospect_decorator.rb:36:in `priority_icon'
     # ./spec/decorators/prospect_decorator_spec.rb:39:in `block (3 levels) in <top (required)>'
     # ./spec/decorators/prospect_decorator_spec.rb:40:in `block (3 levels) in <top (required)>'

This makes them impossible to test without some ridiculous stubbing.

@zacksiri
Copy link

+1

1 similar comment
@theo-bittencourt
Copy link

+1

@mehlah
Copy link
Contributor

mehlah commented Jan 6, 2016

Related I guess to #28

@mehlah mehlah mentioned this issue Jan 6, 2016
@amatsuda
Copy link
Owner

amatsuda commented Jan 6, 2016

Documented via #55 📝

@amatsuda amatsuda closed this as completed Jan 6, 2016
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

6 participants