Featured post

c# - Usage of Server Side Controls in MVC Frame work -

i using asp.net 4.0 , mvc 2.0 web application. project requiremrnt have use server side control in application not possibl in noraml case. ideally want use adrotator control , datalist control. i saw few samples , references in codepleax mvc controllib howwver found less useful. can tell how utilize theese controls in asp.net application along mvc. note: please provide functionalities related adrotator , datalist controls not equivalent functionalities thanks in advace. mvc pages not use normal .net solution makes use of normal .net components impossible. a normal .net page use event driven solution call different methods service side mvc use actions , view completly different way handle things. also, mvc not use viewstate normal .net controlls require. found article discussing mixing of normal .net , mvc.

ruby on rails - Rspec tests fail in Namespace -


i've converted existing rails tests rspec, , tests in namespace fail.

i.e. in example below, accountcontroller spec passes, while childrencontroller fails following error:

in `load_missing_constant': expected /.../app/controllers/admin/children_controller.rb define admin::childrencontroller (loaderror) 

app/controllers/account_controller.rb

class accountcontroller < applicationcontroller 

spec/controllers/account_controller_spec.rb

require 'spec_helper'  describe accountcontroller   #... end 

app/controllers/admin/children_controller.rb

class admin::childrencontroller < applicationcontroller 

spec/controllers/admin/children_controller_spec.rb

require 'spec_helper'  describe admin::childrencontroller      include ::controllerhelper     #...  end 

i'm using

  • ruby-1.9.2-p0
  • rails 3.0.3
  • rspec 2.3.0

i've tried playing namespace definitions, no luck far - ideas???

i had same problem, , not willing place tests in lower directory. in case spork messing things up.

to precise:

spork.each_run   activesupport::dependencies.clear end 

i placed checker if spork running, else should ignore line.

spork.each_run   if /spork/i =~ $0 || rspec.configuration.drb?     activesupport::dependencies.clear   end end 

Comments

Popular posts from this blog

c# - Usage of Server Side Controls in MVC Frame work -

cocoa - Nesting arrays into NSDictionary object (Objective-C) -

ios - Very simple iPhone App crashes on UILabel settext -