similar to: response.should_not redirect_to

Displaying 20 results from an estimated 600 matches similar to: "response.should_not redirect_to"

2007 Sep 21
11
given_it
Hello, Just decided to check whether I am doing something that makes sense or not. I was thinking about how cool would it be to re-use examples (just like we reuse story scenarios with GivenScenario). I was not sure if this possibility already exists in rspec (and, honestly, was lazy to check), so I have created this helper: def given_it(name) example_definition =
2007 Mar 27
1
Aspects
I''ve become very fond of Yurii Rashkovskii''s "aspects". For such a simple change they make it a LOT easier to navigate, read and verify specs. Are there any plans to include something like this in RSpec? Ashley
2007 May 02
13
RSpec 0.8.2 pain, missing spec/rails?
Hi. I''m upgrading a project from an 0.8.0 pre-release gem to 0.8.2. I''ve installed the 0.8.2 gem, and the rspec_on_rails 0.8.2 plugin: ruby script/plugin install svn://rubyforge.org/var/svn/rspec/tags/REL_0_8_2/rspec When I try to run my specs though, I get the below error. It''s as if the spec_helper cannot find "spec/rails". I''ve noticed that
2007 May 19
2
have_text matcher does not support should_not.
Hello Guys, Doing conversion of some test for some controllers, still with integrated views. Anyway, I have this: it "should not see Join This Group button on profile page as member" do get "show", :id => @group.id response.should be_success response.should_not have_text(/Join This Group/) end But running with spec (0.9.4), drop me the folling error:
2007 Apr 04
11
ANN: RSpec 0.9.0 beta-1 available for download.
We''d like to get some feedback on RSpec 0.9 before we start pushing out releases via Rubyforge''s gem server and update the website. We have therefore made the first beta of 0.9 available - both prepackaged and tagged in subversion (see below). RSpec 0.9 introduces a new API for expectations, which essentially means that your underscores go away (there has been other discussions
2011 Jul 25
6
What does using a lambda in rspec tests accomplish?
Here is the code in question: describe UsersController do render_views … … describe "POST to ''create'' action" do describe "failure" do before(:each) do @attr = { :name => '''', :email => '''', :password => '''', :password_confirmation =>
2008 Jan 19
5
"should_not ==" vs "should !="
describe "should_not == vs. should !=" it do 5.should_not == 6 end # passes it do 5.should != 6 end # fails end # I''m running the rspec 1.1.2 gem with the corresponding Textmate bundle # The second failure surprises me. # Is != not supported? # I''d like to hear what you all think. -------------- next part -------------- An HTML attachment was
2007 Apr 06
3
Mocking Authentication
Is anyone using Restful Authentication? If so, how are you mocking the login for your controllers? I''m having trouble with it and would love an example of someone''s login. I''m sure I''m missing something simple. Michael railsconsulting.com
2007 May 08
4
help with rspec''ing controller
Hi, I''m a rspec newbie. I''m having trouble with rspec''ing a simple controller to Create a record. I''ve tried a couple of approaches and still get errors: Mock ''remedy'' expected :save! with (any args) once, but received it 0 times -or- Mock ''Remedy'' received unexpected message :save with (no args). Here are my two
2007 Jun 23
4
inverse examples? (should fail)
The new "pending" example feature reminds me of a feature I''ve been bouncing around in my head, to aid in refactoring. Often, when I''m changing existing behaviour, I know that certain aspects of the old behaviour should change. Imagine changing the "it" method to perhaps "not" or "old" or "removed"... The behaviour would be to
2019 Apr 21
5
Close PRs on GitHub repo
There is already 10 PRs sent to GitHub repo. But they all are useless, in every PR people are being informed that they should send patches to http://reviews.llvm.org/
2009 Dec 08
1
extraction of sub-matrix by name
Dear all, sorry to bother you with potentially known issue -- we have noticed that if we select data frame rows by rownames, we get some results back if the match can be done unambiguously, though the match is not perfect (see example), e.g. x{"2",] will return a row if there is a unique row with name starting with "2" (but may be "2375745"!) is that a
2009 Sep 04
3
asking for suggestions: interface for a C++ class
Dear All, I would like to have an advice for designing an R library, and thought that R-devel may be the best place to ask given so many people who are highly expert in R are around. We are at an early stage of designing an R library, which is effectively an interface to a C++ library providing fast access to large matrices stored on HDD as binary files. The core of the C++ library is
2007 May 30
9
Specify attr_protected
This is kind of a two part question. Question One: I want to be sure that an Order model is protecting sensitive attributes from mass assignment. The example looks like this: describe Order do it "should protect total attribute from mass assignment" do @order = Order.new(:total => 0.05) @order.total.should_not == 0.05 end end And the code to implement it: class Order
2007 Nov 01
3
autotest debugger?
Hi, I keep facing problems with autotest, and I don''t know what''s happening in the background, is there anyway to know what''s happening while testing? Example: @user = User.new @user.email = "testcom" @user.errors.on(:email).should_not be_empty ...throws error failure - You have a nil object when you didn''t expect it! - You might have expected an
2009 Feb 28
7
be_valid (validates_format_of ..., :on => :create)
Greetings, How to write Example which will check if model''s variable''s format is valid using :on => :create, like this: class User < ActiveRecord::Base ... validates_format_of :email, :with => /.../, :on => :create ... Using following code is not right: it "should ..." do @user = users(:example_user) @user.email =
2007 Jun 18
7
Testing for cross site scripting, etc.
Being new to testing and ruby, are there "standard" tests that can be done that test for things like cross site scripting and friends? If not, anyone have ideas on what I might do about testing those sorts of things? I''ll be using rails, also. Mike B. ---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging
2007 Feb 16
0
rspec-ext 0.0.1
Hello, I''ve just released rspec-ext 0.0.1 (http://rubyforge.org/projects/ rspec-ext/) It is gem-installable (rspec-ext gem) It is simply two _experimental_ (and may be not well tested) extensions of rspec as for now: * specify_negatively (http://rashkovskii.com/articles/2007/1/25/rspec- specify_negatively, http://rashkovskii.com/articles/2007/2/3/ specify_negatively-updated) *
2007 Jan 29
3
Bug in should_not_be - What else to use?
Hi! I just stumbled over a possible bug in 0.7.5.1: `1.should_not_be == 1` does not fail. I took a look into the code and figured out, that this is caused by Not.be() using :no_arg instead of :___no_arg. The expected argument of the method be() in Not is passed from should_not_be() with :___no_arg. Not.be() is marked with "Gone for 0.9", so I assume that "should_not_be =="
2007 Dec 30
6
Restful-Authentication Rspec Failure Rails 2.0.2
I am trying the Restful-Authentication (latest version, downloaded today) and upon running the generator, doing the migration, prepping the test system and putting the resources in routes.rb I get a Rspec test failure: ''SessionsController logins and redirects'' FAILED expected not nil, got nil routes.rb has: map.resources :users map.resources :sessions nothing else was