Re: [rspec-users] Good tutorial for RSpec With Rails 3

2011-03-10 Thread Mohnish J.
Hi James, Thanks for your suggestion. James Martin wrote in post #986783: > I understand you're looking for 'free' tutorials but I would really > strongly > advise you check out Michael Hartl's > http://ruby.railstutorial.org/screencast series. I'm not affiliated > with this in any way, but I wat

Re: [rspec-users] How to use rspec_scaffold generator with latest rspec gem.

2011-03-10 Thread Mohnish J.
Hi Cole, Thanks for the link and yorr reply. Yep , I did want to generate a scaffold with all rspec tests. Pixel wrote in post #986740: > On Thu, Mar 10, 2011 at 7:49 AM, Mohnish J. > wrote: > >> for me using the above RoR configuration. >> > > Hi Mohnish, > > The rails generator script will pr

Re: [rspec-users] Good tutorial for RSpec With Rails 3

2011-03-10 Thread Mohnish J.
Hi Jon, Thanks for your recommendation. Jon Homan wrote in post #986735: > I recommend getting a copy of The RSpec Book ( > http://www.pragprog.com/titles/achbd/the-rspec-book). I read through > that > when I was fairly new to RSpec and I think it helped ramp up quickly. > > Jon Homan -- Posted

Re: [rspec-users] Trying to test flash messaging with rspec

2011-03-10 Thread Tyrel R.
That worked perfectly thank you :) -- Posted via http://www.ruby-forum.com/. ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] Trying to test flash messaging with rspec

2011-03-10 Thread James Martin
How about just testing the flash directly, which should be accessible from your test: flash[:success].should =~ /welcome new user/i I've used a case insensitive regex here, which I think captures the intent of your test without being quite so rigid. What do you think? On Fri, Mar 11, 2011 at

Re: [rspec-users] How to use rspec_scaffold generator with latest rspec gem.

2011-03-10 Thread Mohnish J.
David Chelimsky wrote in post #986732: > On Mar 10, 2011, at 7:49 AM, Mohnish J. wrote: > >> also. >> Could you please tell me how should I give to accordingly for it to work >> for me using the above RoR configuration. > > rails generate rspec:install > rails generate scaffold > > In Rails 3, once

[rspec-users] Trying to test flash messaging with rspec

2011-03-10 Thread Tyrel R.
Hello every one, So my this rspec test fails: [code] it "should have a welcome message" do post :create, :user => @attr response.flash[:success].should eql("Welcome new user!") end [/code] However when I create a new user the flash message does display just as I had wanted

Re: [rspec-users] Rspec single file

2011-03-10 Thread Ken Chien
I assume you're asking in the context of Rails? If so, take a look at Spork[1]. You can choose what you want to load once, and what you want to load before every spec. Ken --- [1] https://github.com/timcharper/spork 2011/3/10 phani kumar > > > Hi Guys, > > How can run the single spec file wi

Re: [rspec-users] Good tutorial for RSpec With Rails 3

2011-03-10 Thread James Martin
I understand you're looking for 'free' tutorials but I would really strongly advise you check out Michael Hartl's http://ruby.railstutorial.org/screencast series. I'm not affiliated with this in any way, but I watched them recently (more for the Rails 3 info than RSpec) and found the use of RSpec a

[rspec-users] Rspec single file

2011-03-10 Thread phani kumar
Hi Guys, How can run the single spec file without loading the environment. I know ruby spec commands will load the total environment. I want to run the files one by one those are not in same folder and i want to load test environment once for all 10 files. Can we run single file through the R

Re: [rspec-users] Good tutorial for RSpec With Rails 3

2011-03-10 Thread Jon Homan
I recommend getting a copy of The RSpec Book ( http://www.pragprog.com/titles/achbd/the-rspec-book). I read through that when I was fairly new to RSpec and I think it helped ramp up quickly. Jon Homan On Thu, Mar 10, 2011 at 5:52 AM, Mohnish J. wrote: > Hi, > > I am looking for a good free tut

Re: [rspec-users] How to use rspec_scaffold generator with latest rspec gem.

2011-03-10 Thread Pixel
On Thu, Mar 10, 2011 at 7:49 AM, Mohnish J. wrote: > I am unable to use the old rspec generator ( rspec_scaffold ) with rspec > 2.5 and rspec-rails 2.5 gem. As expected I get the following error as > given below. > >    mohnish@mohnish-desktop:~/rails_testing/10Mar11/rspec_demo3$ rails g > rspec_

Re: [rspec-users] How to use rspec_scaffold generator with latest rspec gem.

2011-03-10 Thread David Chelimsky
On Mar 10, 2011, at 7:49 AM, Mohnish J. wrote: > Hi, > > I am a newbie to Rails 3 and Rspec. Kindly excuse my being a novice. > > I am trying to use RSpec with Rails 3. I am using rails 3.0.3 and ruby > 1.9.2 on ubuntu 10.04 os. > > I am currently referring to the tutorial on :- > http://www.r

[rspec-users] Issues implementing Rspec with Rails3 from tutorial

2011-03-10 Thread Mohnish J.
Hi, I am a newbie to Rails 3 and Rspec. Kindly excuse my being a novice. I am trying to implement RSpec with Rails 3. I am using Rails 3.0.3 with Ruby 1.9.2 on Ubuntu 10.04 os. I am using rspec 2.5 gem and rspec-rails 2.5 gem. I am referring to the following tutorial:- http://www.railsfire.com

[rspec-users] How to use rspec_scaffold generator with latest rspec gem.

2011-03-10 Thread Mohnish J.
Hi, I am a newbie to Rails 3 and Rspec. Kindly excuse my being a novice. I am trying to use RSpec with Rails 3. I am using rails 3.0.3 and ruby 1.9.2 on ubuntu 10.04 os. I am currently referring to the tutorial on :- http://www.railsfire.com/article/rspec-behaviour-driven-development-testing-fra

[rspec-users] Good tutorial for RSpec With Rails 3

2011-03-10 Thread Mohnish J.
Hi, I am looking for a good free tutorial which implements RSpec with Rails 3. I have found many tutorials which work for Rails 2.x but leads you into issues when trying the same in Rails 3. Rspec Gem also has updated , coming off the age.. Leading into compatibility issues. I am able to setup RS

[rspec-users] unless filter

2011-03-10 Thread Shamaoke
Hi. Why doesn't the following filter work? ~~~ # encoding: utf-8 # ./example_spec.rb RSpec.configure do |config| config.filter = { unless: :condition_acceptable } end describe 'some code' do it 'does one', if: :condition_acceptable do end it 'does two', unless: :condition_accepta

Re: [rspec-users] How to do controller.stub(:some_method) at request test when using rspec2

2011-03-10 Thread Jiang Guimin
Kenrick Chien wrote in post #986591: > pass the controller name, without quotes: > describe DynamicFlowsController > > then > controller.stub > > should work, and then you can refactor the dependency on save_u_and_node > later. > > Ken Thanks, it's work now! But I can't get the controller obj