Re: [rspec-users] undefined local variable or method

2013-08-02 Thread Guirec Corbel
Hello, I retried with the version 2.14. I have this spec : require 'spec_helper' describe OrdersController do #... describe "POST 'create'" do subject(:do_post!) { post 'create', params } context "when the order and the credit card and the payment are valid" do before do

Re: [rspec-users] (no subject)

2013-08-02 Thread Guirec Corbel
I forgot to add a title! An administrator can edit it, please? Thanks! 2013/7/16 Guirec Corbel > Hi, > > I realy like to use features spec but I have some questions about the > organisation : > > 1. How should I group the features specs? > ---

[rspec-users] (no subject)

2013-08-02 Thread Guirec Corbel
Hi, I realy like to use features spec but I have some questions about the organisation : 1. How should I group the features specs? -- For the moment, I try to group by controllers. For example, I can have a file "users_spec.rb", "artists_sp

[rspec-users] Rails params[]

2013-08-02 Thread oliver
Is it possible in rails to have params like this or syntax of params like this? <% @users.each do |user| %> <% @menus.each do |menu| %> *params["user.name" "menu.id"]* <% end %> <% end %> -- View this message in context: http://ruby.11.x6.nabble.com/help-Rails-params-tp49930

[rspec-users] RSpec can't define singleton error when trying to mock gets and puts for Hash Elements

2013-08-02 Thread Mohnish G j
I have a Book Model which is a ruby script that assigns prices to certain predefined Book titles mentioned in the program. Here's how the book model looks:- class Book attr_accessor :books def initialize books puts "Welcome to setting book price program" @books =

[rspec-users] RSpec2 error codes testing

2013-08-02 Thread Robert Lis
I have an issue with testing error codes. If a record is not found, it raises exception ActiveRecord::RecordNotFound. The thing is, I wanna check if 404 is returned. If I go ahead and just check : response.status.should == 404 Then this will make the test case fail as RecordNotFound exception is

[rspec-users] How to catch the mocked infinite loop behavior and handle it with a rescue block using RSpec

2013-08-02 Thread Mohnish J.
I have a Book Model which is a ruby script that assigns prices to certain predefined Book titles mentioned in the program. I'm using Ruby 1.9.3-p327 and rspec 2.11.0 #class RspecLoopStop < Exception; end class Book attr_accessor :books def initialize books puts "Welc

Re: [rspec-users] Rails params[]

2013-08-02 Thread Adam Sroka
Did you try it? What happened? On Mon, Jul 22, 2013 at 2:56 AM, oliver wrote: > Is it possible in rails to have params like this or syntax of params like > this? > > <% @users.each do |user| %> > <% @menus.each do |menu| %> > > *params["user.name" "menu.id"]* > > <% end %> > <% end %>