similar to: should_be_different -- possible implementation

Displaying 20 results from an estimated 600 matches similar to: "should_be_different -- possible implementation"

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
2007 May 08
3
assert_difference eval magic in [6693]
I just saw Marcel''s change to assert_difference that changes the method API to take a string param that is evaled in a lambda. http://dev.rubyonrails.org/changeset/6693 I much preferred the old API, since it''s simple enough to pass a lambda. Passing a string means the lambda is in the wrong scope and doesn''t have access to objects in the test case scope. For an
2009 Apr 30
1
error with test:functionals
Hello there, I working on my tests but I getting this strange errror: I can see on the database that the object was created but I still got an failure on my test. this is my test code: test "should create artist" do assert_difference(''Artist.count'', difference = 1) do post :create, :artist => { } end assert_redirected_to
2007 May 30
2
should_eql etc?
Hi, I''m trying the specs for restful_authentication I found here http://jonathan.tron.name/articles/2007/01/02/rspec-on-rails-restful- authentication It seems to use custom .should methods: should_eql, should_be_an_instance_of, should_redirect_to, should_be_success, should_not_be_nil, should_be_nil, should_not_be_nil, should_be_empty, should_be_success, should_not_change, and
2006 Aug 06
2
assert_difference gives undefined method error in unit tests
Hi there Am hitting undefined method errors for ''assert_difference'' in my unit tests under Rails 1.1.4 What could I be missing? Richard Sandilands
2007 Jun 12
1
should_change
Hi, I''m wondering if I''m using should_change correctly. Here''s what I''m doing http://pastie.caboo.se/69704 thanks
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 Oct 17
1
Problem with assert_difference
Hello Friends, I have problem with assert_difference, I want its syntax and explantion in detail, Please help me, plz give me solution. Regards, Kiran Polawar --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to
2006 Oct 17
0
new handling of equality
All, Based mostly on the earlier thread on "should_be", we have introduced a new branch called should_be_working_like_ruby with the new proposed handling for equality. Per the CHANGES file in that branch (rev 896): ============================================ IMPORTANT NOTE: THIS RELEASE IS NOT 100% BACKWARDS COMPATIBLE TO 0.6.x This release changes the way RSpec handles equality.
2007 May 01
6
rspec and autotest
If you want to use rspec-0.9.2 with autotest (ZenTest-3.5.2), you''ll want to read this blog: http://blog.davidchelimsky.net/articles/2007/05/01/rspec-0-9-1-and-autotest-zentest-3-5-2 Enjoy! David
2006 Jan 31
6
How to Affect Plugin Load Order
I''m using bundled_resource, login_engine, and a few other plugins. It appears Rails considers plugins in alphabetic order. Turns out that there is a particular order that will work and alphabetic ain''t it. The login engine must be loaded first. Bundled resource then includes ''application_helper'' and the application helper includes LoginEngine. If
2007 Mar 19
3
rSpec on Rails Integration Testing
I see that there is an integration testing example in the plugin code. What is the thinking about integration specs? Thanks, Steve
2011 Aug 02
1
Rspec teting API.
Hi! Guys, I wanna test an API built in Rails 3.0.3. So, my question is... What''s the better way to test my own api? I guess that a requests specs like these: describe ''POST /client'' it ''works'' do assert_difference post ''/clients'', :client => {...} end end can be appropriate... Someone just tested an API? I mean... simulate
2007 Mar 03
3
ignoring attempt to close td with tr ???
I got the most current rspec and installed as a plugin. Running rake spec:controllers gives me this error: ignoring attempt to close td with tr I dumped response.body and everything looks fine. Is this a known issue? Nothing in Google about it. Thanks, Steve
2007 Aug 30
8
experimental rails story adapter in trunk
For those of you interested in getting a jump on learning about and using the new Story Runner in a Rails app, I''ve added an experimental Rails-Story adapter to trunk. You can see how to use it here: http://pastie.caboo.se/92320 This is PURELY EXPERIMENTAL, however it actually works and will likely not change much in the way that it does work. Happy hacking! David
2007 Jan 05
4
How To Spec Controllers with Finders
Given this code (which renders rjs), I''m faced with the fixture- driven way of spec-ing or mocking. How the heck to you mock this so the code at line (2) and (4) work right? I''m still struggling with mocks but it seems like this can be done. Forgive the naivety of this question. 1. def change_quantity 2. @line_item = LineItem.find_by_id(params[:id]) 3. unless
2007 Jan 09
9
Date Approximation in Specs
The floating-point expectations allow for an error tolerance. Is there any similar facility for dates? For example, say I have a custom class that handles date/time spans and I want to spec it: context "A DateRange span" do specify "should know when a week ago is :)" do d = DateRange.new d.last_week.should_be_close_to(1.week.ago, 24*60*60) end end The idea
2007 Aug 23
6
controller spec with model that validates_uniqueness
I want to use mocks and stubs to test the controller, but am having trouble getting my validation not to trigger. Here''s the code: # spec: Image.stub!(:find).and_return(@image) @image.should_receive(:save!).once.with(:any_args) put :update, :id => @image.id, :category_id => @category.id, :image => {:name => ''test'', :image_number =>
2007 May 03
7
before method
Would it be desirable to have before and after take a spec name as well as :each and :all? Scott
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