search for: should_rend

Displaying 18 results from an estimated 18 matches for "should_rend".

Did you mean: should_read
2007 Jun 19
5
Problems translating should_render from 0.8.2 to 1.0.5
<font size="2">I''m working on a large Rails site and we want to move from RSpec 0.8.2 to the latest and greatest.&nbsp; So we ran the translator and yet we''re having a lot of trouble translating should_render.<br><br>I found this on the web:<br><br>We will NOT be supporting the following in the new syntax:<br>&nbsp; controller.should_render<br>&nbsp; controller.should_redirect_to<br><br>You will be able to use instead:<br>&nbsp; respons...
2006 Nov 21
1
Documentation Nit
I''m trying to wrap my head around rspec_on_rails and ran into the following documentation nit: -------- what it says -------- You can specify :template, :text, or :action. controller.should_render :template=>"path/to/template/for/action" controller.should_render :text=>"expected text" controller.should_render :action=>"expected_action" -------- what it means -------- You can specify :template, :text, or :action, depending on how the rendering was...
2007 Sep 08
3
template.expects_render?
...d method error on expects_render. I made sure I had the 1.0.8 gem as well as reinstalling the plugin and redoing the bootstrap. Still no luck. So I created a clean project, installed the CURRENT plugin, ran script/ generate rspec and generated a vanilla rspec scaffold. I added the template.should_render to a view spec, and am still getting the undefined method error. I had assumed this method would be available in 1.0.8, as it was supposed to be added to 1.0.6. Am I wrong? Or am I missing something crucial about the usage? Thanks, Leslie Below is my view spec: require File.dirname(__F...
2007 Apr 09
10
changes in 0.8 and greater - should_
Has the should_... syntax changed? I''m getting errors when running the following: should_render(:index) should_be_valid should_not_be_valid should_respond_to should_be should_render I thought the syntax changed to something like the following: obj.should render(:index) but this doesn''t seem to work. Scott
2007 May 26
11
RSpec
Hi RSpec Mailing list, I''m new to RSpec and I am trying to get it running with the caboo.se sample rails app. I installed the current version of rspec with rspec_on_rails I tried to run rake spec but received: 330-07:~/desktop/restful_auth_rspec/vendor multimedia$ rake spec (in /Users/multimedia/Desktop/restful_auth_rspec)
2007 May 21
4
Just upgraded to 1.0.0, should render_text isn''t working for me
I finally got around to upgrading from 0.8.2 (!!). I had a spec which looked like specify "should render abc123" do controller.should_render :text => "abc123" get :key end With 1.0.0, the new spec is it "should render abc123" do get :key response.should render_text("abc123") end However it doesn''t work, giving me the error: undefined method `render_text'' for #<#<Class:0...
2006 Nov 07
7
should_redirect_to in advance - feels unnatural
I can understand that it''s easier for rspec to set up a mock in advance of the controller call. But it makes it difficult to do something like: context "The HarkController, given Louie the logged-in user" do setup do post :login, :username => ''louie'', :password => ''atest'' end specify "should redirect Louie to the home
2007 Mar 28
1
extracting common methods out of specs
I have several specs which do more or less the same thing: describe "GET /users/1/terms" do controller_name :terms def do_get get :index, :user_id => 1 end it "should be successful" do controller.should_render :index do_get end ... end How could I extract this functionality from each spec? Scott
2007 Jun 12
3
rspec 1.0.x and liquid?
Is anyone else using liquid with the > 1 rspec? This seems to fail: it ''should render show'' do response.should render_template(''buyers/show'') get :show, :id => 1 end with an error like 1) NoMethodError in ''/buyer GET should render show'' You have a nil object when you didn''t expect it! The error occurred
2007 Apr 09
7
RCov results seem to include the spec files
I saw the RCov page at http://rspec.rubyforge.org/tools/rcov.html and decided to add it to my project. My rakefile looks like this: require "rake" require "spec/rake/spectask" desc "Run all specs with RCov" Spec::Rake::SpecTask.new("spec:rcov") do |t| t.spec_files = FileList["spec/**/*_spec.rb"] t.rcov = true end When I run rake spec:rcov,
2007 Feb 15
4
defining context(s) dynamically
...esponse.should_be_success<br> &nbsp;&nbsp;&nbsp; end<br> &nbsp;&nbsp;&nbsp; specify "should render edit.rhtml" do<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; do_get<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; controller.should_render :edit<br> &nbsp;&nbsp;&nbsp; end<br> &nbsp;&nbsp;&nbsp; specify "should find the #{klass} requested" do<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; @model.should_receive(:find).and_return(@mock)<br> &nbsp;&nbsp;&nbsp...
2007 Aug 13
1
expect_render not?
hi, I have a template that conditionally renders a partial. Is there a way to test that a partial is NOT rendered? :)
2006 Nov 24
13
rSpec on Rails 1.2?
I just updated my Rails install to the most current Edge and my controller specs fail: 1) TypeError in ''The User Controller should be a user controller'' can''t convert nil into String Each spec fails the same way. <context string> <spec string> can''t convert nil into String Any ideas what''s up with this? Thanks, s.ross
2007 Jan 09
6
rcov seg fault
...ld_receive(:create!).with({ ''name'' => ''Attendee'' }).and_raise(ActiveRecord::RecordInvalid.new(Attendee.new)) post :create, :attendee => { :name => ''Attendee'' } end specify ''should render new'' do controller.should_render :action => ''new'' post :create end end All I get is /usr/lib/ruby/gems/1.8/gems/rspec-0.7.5/lib/spec/mocks/error_generator.rb:53: [BUG] Segmentation fault I tried variations on the specs and setup, but it fails when only running the should render new spec and everythin...
2007 Jan 21
35
Collection proxies need to be stubbed ?
...(projects_proxy = Object.new) projects_proxy.should_receive(:active).and_return([:a, :b]) get :index end specify "should have a list of projects available" do assigns[:projects].should == [:a, :b] end specify "should render the index view" do controller.should_render :template => "dashboard/index" end specify "should be a successful call" do response.should_be_success end end Thanks ! -- Fran?ois Beausoleil http://blog.teksol.info/ http://piston.rubyforge.org/
2007 Feb 02
7
Coming Soon...
..."should get_a_raise", you''ll have a very easy means of doing so. == Will there be any existing expectations that will no longer be supported at all? Yes, but only a few, and only related to RSpec on Rails. We will NOT be supporting the following in the new syntax: controller.should_render controller.should_redirect_to You will be able to use instead: response.should render_template response.should render_text response.should redirect_to ... but only after the action. == For )(*&)(*''s sake, WHEN will you stop making changes like this? Right now. While we...
2007 Jul 26
5
Coding standards and whitespace
...ndle/Snippets/should_receive.tmSnippet RSpec.tmbundle/Snippets/should_receive_with_any_args.tmSnippet RSpec.tmbundle/Snippets/should_receive_with_args.tmSnippet RSpec.tmbundle/Snippets/should_receive_with_no_args.tmSnippet RSpec.tmbundle/Snippets/should_redirect_to.tmSnippet RSpec.tmbundle/Snippets/should_render.tmSnippet RSpec.tmbundle/Snippets/should_respond_to.tmSnippet RSpec.tmbundle/Snippets/should_satisfy.tmSnippet RSpec.tmbundle/Snippets/should_throw.tmSnippet RSpec.tmbundle/Snippets/teardown.tmSnippet RSpec.tmbundle/Snippets/twice.tmSnippet rspec_on_rails/generators/rspec/templates/script/spec_se...
2007 Apr 11
13
View Specs Fail with "protected method render"
I''ve got rspec and zentest installed as well as the rspec rails plugin, and my model/controller specs all pass and work well. I can''t seem to get views to work though - 100% of the specs fail with: NoMethodError in ''/users/show.rhtml should render attributes in <p>'' protected method `render'' called for