similar to: rspec tutorial - "one item" should equal "one item"

Displaying 20 results from an estimated 20000 matches similar to: "rspec tutorial - "one item" should equal "one item""

2007 Jan 19
1
Error when following online tutorial
Hi I''m following the tutorial from the website. I''ve got to the end, but I''ve been getting this failure: ''A stack with one item should return top when you send it top FAILED "one item" should equal "one item" ./stack_spec.rb:28: ./stack_spec.rb:27:in ''instance_eval'' 3 specs 1 failure I do not
2007 Dec 13
1
RSpec and Mock Tutorial/Cheatsheet
I wrote a simple summary of Mocks with RSpec as an answer to a discussion on our local Ruby users group. I was wondering if people here could review it, adding comments for any corrections or other important ideas regarding mocks and RSpec. You can find the article here: http://blog.showcase60.com/2007/12/13/rspec-mocks Thanks
2006 Nov 27
1
rSpec website tutorial correction
Hi there, On page http://rspec.rubyforge.org/documentation/rails/writing/views.html the view spec example is incorrect. Instead of: require File.dirname(__FILE__) + ''/../../spec_helper'' It should read: require File.dirname(__FILE__) + ''/../spec_helper'' Regards, Keith
2009 Oct 23
10
Rspec Tutorial
Hi Everybody, Greetings!! I want to use rspec for my applications. Please guide me with the Rspec tutorial. I want a good example to start with. Please help me by providing good tutorials on Rspec to start with. I actually followed the example from http://rspec.info Please guide me on more examples. Waiting for your reply. --~--~---------~--~----~------------~-------~--~----~ You received
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
2008 Jun 07
2
rcov causing a segmentation fault on rspec 1.1.4 and rails 2.1
Hello again :) I''m trying to run rcov on my specs here but i''m getting a lot of segmentation faults (and they usually happen at different places): /home/mauricio/NetBeansProjects/reeds/vendor/rails/activerecord/lib/active_record/attribute_methods.rb:211: [BUG] Segmentation fault ruby 1.8.6 (2007-09-24) [i486-linux]
2007 Sep 18
2
FW: Specifying spec and output format inline?
Anyone have any advice on this one? Thanks, Adam ________________________________ From: rspec-users-bounces at rubyforge.org [mailto:rspec-users-bounces at rubyforge.org] On Behalf Of Adam Reed Sent: Monday, September 17, 2007 2:14 PM To: rspec-users at rubyforge.org Subject: [rspec-users] Specifying spec and output format inline? Howdy from Austin, TX. I''m new to rspec, and am
2007 Sep 20
2
FW: FW: Specifying spec and output format inline?
One more try? I just want the script to save the rspec output to an html file when the script is run. In this case, the script will be run from SciTE using F5, rather than by command line. Is there a way to specify this within the ruby script? ________________________________ From: rspec-users-bounces at rubyforge.org [mailto:rspec-users-bounces at rubyforge.org] On Behalf Of Adam Reed
2006 Dec 11
1
FAILED: "test" should equal "test" - what?
I''m trying out rspec_on_rails with a very simple test: ... specify "product name should be ''test''" do Product.find( :all ).first.name.should_equal ''test'' end ... with this fixture: first: id: 1 name: test When I run it: .F 1) ''Given a generated product_spec.rb with fixtures loaded product name should be
2011 Sep 14
1
rspec and should have_many through
Hi, Anyone can help me with rspec shoulda validations please. I can''t get the syntax right for these validations. Please correct me it { should have_one :tradable, :through => :trade_order} it { should belong_to :source, :polymorphic => true } it { should have_many :transfers, :as => :source } this is for Rspec 2, rails 3.1, gem "rspec-rails" gem
2010 Jun 10
1
RSpec 2 equivalent for: assigns[:message].should == @message
describe MessagesController, "POST create" do before(:each) do @message = mock_model(Message, :save => nil) Message.stub(:new).and_return(@message) end context "when the message fails to save" do before(:each) do @message.stub(:save).and_return(false) end it "assigns @message" do post :create assigns[:message].should
2008 May 20
4
New to "Agile Development" - should I use RSpec or Test::Unit?
Hi everyone, I''m just now really starting to look into Agile Development, and so I''m trying to gauge what the Rails community''s preference is in regards to using RSpec versus the built-in Test::Unit. I haven''t really delved much into testing in the past, I''m sad to say, but I understand why it''s beneficial to writing maintainable code and
2007 Jul 26
5
Coding standards and whitespace
Recently as a result of using Git I''ve noticed a number of inconsistencies in the RSpec codebase with respect to whitespace (mixed line endings, mixed use of spaces and tabs for indentation, and trailing whitespace at the end of lines). I never would have noticed, but Git produces nice colorized diff output which highlights these kinds of inconsistencies. I wanted to ask if the
2008 Nov 04
18
Can I do foo.should (be_nil || be_empty) in rspec
Is there any way to do foo.should (be_nil || be_empty) in rspec. Thanks in advance -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20081104/ee43c9c9/attachment.html>
2009 May 25
3
[rspec] http://rspec.info examples are broken
It seems that some examples at http://rspec.info are broken with invalid html. For example: http://rspec.info/documentation/before_and_after.html All those spans there should not be visible, I think :) Isn''t rspec.info web tested well enough? :P Best regards, Jarmo
2010 Oct 03
2
rspec-1.3.1.rc and rspec-rails-1.3.3.rc are released!
rspec-1.3.1.rc and rspec-rails-1.3.3.rc are released! These are release candidate gems for updates 1.x series, including some bug fixes and deprecation warnings for functionality that will be removed in rspec-2. Barring unexpected complications, I''ll release final versions of these gems within the next week. Cheers, David
2008 May 30
2
Any good Rails example app created with RSpec and Rspec on Rails?
Hi, I''m pretty new to RSpec. I''ve been browsing http://opensourcerails.com to find a good app built using RSpec (and RSpec on Rails). Does anybody have a recommendation? I wanna see example of mocks/stubs, associated models and integrated_view. -T
2007 Jan 10
7
foo_spec.rb -> foo.rspec (proposed RSpec file name convention)
Is it too late to suggest some filename conventions for example rspec files--especially when bundling with gems? I see spec_foo.rb and foo_spec.rb around. Also found some foo_ex.rb around. Would having a foo.rspec be worth talking about? Or is the convention more or less to have ''spec'' in the file name? I have to confess the only real motivation I have at the moment is syntax
2007 Nov 13
2
new to rspec, error running "rake rspec" on debian/etch
I have the latest version of rspec and rails-rspec installed. I''m using the debian versions of ruby and rails. On a new project after a generate an "rspec_model" and then try to run "rake spec", I get the following error: dan at dan-server:~/projects/cw/registration$ rake spec (in /home/dan/projects/cw/registration)
2011 Jun 29
6
RSpec with Rails 3.1rc4: spec test won't recognize <%= %> (should be simple)
In my user_sessions_controller: class UserSessionsController < ApplicationController before_filter :require_no_user, :only => [:create, :new] before_filter :require_user, :only => :destroy def new @user_session = UserSession.new @message = "Hello." end def create @user_session = UserSession.new(params[:user_session]) if @user_session.save