assaf/vanity — Issue #93: Running tests throws NoMethodError for use_vanity helper
Author: nickbarnwell
Created: 2012-01-12 01:19:56+00:00
State: open

Attempted using gemsets, with and without bundle exec, and several different interpreters and kept running into this issue. Was hoping to commit something back to mainline, but would love to run tests first :) Any advice on how to resolve?

Stack trace:
______
```ruby
** Invoke test (first_time)
** Execute test
/Users/Nick/.rvm/rubies/ruby-1.9.2-p290/bin/ruby -I"lib" -I. -I"/Users/Nick/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib" "/Users/Nick/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/rake_test_loader.rb" "test/adapters/redis_adapter_test.rb" "test/experiment/ab_test.rb" "test/experiment/base_test.rb" "test/metric/active_record_test.rb" "test/metric/base_test.rb" "test/metric/google_analytics_test.rb" "test/metric/remote_test.rb" "test/passenger_test.rb" "test/playground_test.rb" "test/rails_dashboard_test.rb" "test/rails_helper_test.rb" "test/rails_test.rb"
/Users/Nick/Projects/Estately/vanity/test/experiment/ab_test.rb:4:in `': undefined method `use_vanity' for AbTestController:Class (NoMethodError)
from /Users/Nick/Projects/Estately/vanity/test/experiment/ab_test.rb:3:in `'
from /Users/Nick/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-2.3.14/lib/active_support/dependencies.rb:182:in `require'
from /Users/Nick/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-2.3.14/lib/active_support/dependencies.rb:182:in `block in require'
from /Users/Nick/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-2.3.14/lib/active_support/dependencies.rb:547:in `new_constants_in'
from /Users/Nick/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-2.3.14/lib/active_support/dependencies.rb:182:in `require'
from /Users/Nick/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/rake_test_loader.rb:15:in `block in

'
from /Users/Nick/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/rake_test_loader.rb:4:in `select'
from /Users/Nick/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/rake_test_loader.rb:4:in `

'
rake aborted!
Command failed with status (1): [/Users/Nick/.rvm/rubies/ruby-1.9.2-p290/bi...]
/Users/Nick/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/file_utils.rb:53:in `block in create_shell_runner'
/Users/Nick/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/file_utils.rb:45:in `call'
/Users/Nick/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/file_utils.rb:45:in `sh'
/Users/Nick/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/file_utils_ext.rb:39:in `sh'
/Users/Nick/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/file_utils.rb:82:in `ruby'
/Users/Nick/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/file_utils_ext.rb:39:in `ruby'
/Users/Nick/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/testtask.rb:99:in `block (2 levels) in define'
/Users/Nick/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/file_utils_ext.rb:60:in `verbose'
/Users/Nick/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/testtask.rb:98:in `block in define'
/Users/Nick/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `call'
/Users/Nick/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `block in execute'
/Users/Nick/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `each'
/Users/Nick/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `execute'
/Users/Nick/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/task.rb:158:in `block in invoke_with_call_chain'
/Users/Nick/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize'
/Users/Nick/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/Users/Nick/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/task.rb:144:in `invoke'
/Users/Nick/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/application.rb:116:in `invoke_task'
/Users/Nick/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block (2 levels) in top_level'
/Users/Nick/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `each'
/Users/Nick/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block in top_level'
/Users/Nick/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/Users/Nick/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/application.rb:88:in `top_level'
/Users/Nick/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/application.rb:66:in `block in run'
/Users/Nick/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/Users/Nick/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/application.rb:63:in `run'
/Users/Nick/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/bin/rake:33:in `'
/Users/Nick/.rvm/gems/ruby-1.9.2-p290/bin/rake:19:in `load'
/Users/Nick/.rvm/gems/ruby-1.9.2-p290/bin/rake:19:in `

'
Tasks: TOP => test
```