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 giving incorrect error messages -


following railstutorial, keep getting error message (one of 4 actually) when should working:

userscontroller authentication of edit/update pages signed-in  users should require matching users 'edit' failure/error: @users = [@user, second, third] undefined local variable or method 'second' #<rspec::core::examplegroup::nested_3::nested_7::nested_2:0x000001040dcb68> # ./spec/controllers/users_controller_spec.rb:275:in 'block (4 levels) in <top (required)>' 

i have tried fix looking @ other questions on stack overflow no avail. gemfile looks this:

gem 'rails', '3.0.3' gem 'sqlite3-ruby', '1.2.5', :require => 'sqlite3' gem 'gravatar_image_tag', '0.1.0' gem 'will_paginate', '3.0.pre2'  group :development   gem 'rspec-rails', '2.0.1'   gem 'annotate-models', '1.0.4'   gem 'faker', '0.3.1' end  group :test   gem 'rspec-rails', '2.0.1'   gem 'webrat', '0.7.1'   gem 'spork', '0.8.4'   gem 'factory_girl_rails', '1.0' end 

any suggestions appreciated!

the backtrace coming users_controller_spec. without source, it's hard say, i'm guessing it's this:

describe userscontroller   before     @user = factory(:user)     sign_in(@user)   end    context "get edit user"     before        @other_user = factory(:user)       :edit, :id => @other_user     end      "should disallow editing of other users"       # ... expectations here of http 401 or user-friendly message     end   end end 

note variables shared between #before blocks , examples instance variables - local variables wouldn't shared across them. i'm guessing code might trying share local between examples, or between #before block , examples.


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 -