ruby on rails - RoR Hobo: Could not find table -


so i'm trying add subclass 1 of models , create fixture , test it, seem running errors along way. don't know how describe problem, recreated following steps. if want me add question please ask.

console

$ hobo new lab --setup $ cd lab $ hobo g model foo num:integer 

ide

#inserted app/models/foo.rb def do_foo     num*5 end  #create app/models/bar.rb class bar < foo     def doo_foo         num*10     end end 

console

$ hobo g migration 

ide

#create test/fixtures/bars.yml bar_one:   num: 1  #create test/unit/bar_test.rb require 'test_helper' class bartest < activesupport::testcase   def test_bar     puts bar.first.do_foo     assert true   end end 

console

$ rake test 

error

1) error: test_bar(bartest): activerecord::statementinvalid: not find table 'bars' 

take out fixture. since bar subclass of foo use foos fixture.


Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -