similar to: respond.should be_successful

Displaying 20 results from an estimated 6000 matches similar to: "respond.should be_successful"

2007 Feb 27
8
Using a subversion repository to spec in a rails app
Is it a bad practice to use a subversion repository to the trunk of rspec and rspec_on_rails? Or rather, is it doomed to fail, since my gem will always be out of date? I know I can''t use spec, installed from gem,s if I have the latest revision of rspec and rspec_on_rails checked into my plugins directory. But I should still be able to use it with the --drb option, correct?
2007 Apr 09
10
changes in 0.8 and greater - should_
Has the should_... syntax changed? I''m getting errors when running the following: should_render(:index) should_be_valid should_not_be_valid should_respond_to should_be should_render I thought the syntax changed to something like the following: obj.should render(:index) but this doesn''t seem to work. Scott
2007 Aug 14
4
Stubbing all methods
Mocha''s mock/stub framework has the ability to stub all methods on a mock given. Does RSpec''s mocking framework have this ability? And if not, is there some reason it shouldn''t be implemeneted? Regards, Scott
2007 Apr 10
5
using YAML for --failures and --examples
As it is currently, in trunk, --failures and --examples except a text file, each line containing the name of a spec. I''m wondering: Would a a patch to use YAML (instead or as well as) plain text be welcomed? I''m thinking of a yaml file like the following: spec_file_1: file: spec/person_spec.rb specs: - should have first name - should provide email address
2007 Apr 01
11
--color doesn''t work with --drb w/rspec_autotest
If I got this to work, do you think we could/should check in rspec_autotest into rspec? I''ve updated rspec_autotest abit, so let me know if you''d like the modified code. Scott
2007 Jun 08
20
When to use BDD/TDD w/ external libraries
Test First Development is great...But should you use it when you are adding classes/methods on to external library that doesn''t have an extensive test suite? I noticed that the rspec plugin for autotest has no specs. David Chemlinsky said something to the list a while back that has been stewing in my subconscious - that you develop software differently using Test First
2007 Apr 10
6
getting output of STDOUT in spec
Consider the following method: def name_to_terminal puts "Scott Taylor" end How would I spec this out? Scott
2007 Aug 15
8
Extra Options to Heckle
I''ve tried running Heckle with rspec on some of my classes, but keep getting (what I believe to be) an infinite recursion. Is there some way to supply extra options to heckle via. rspec? Scott
2007 Feb 26
15
drbspec - "no server running"
At times I''ve gotten the message "No Server Running" from drbspec with my rails app. The thing is, the drb server certainly is running! This happened a few times with my model specs. I''m not sure exactly what the problem was there - I believe I was loading up fixtures that didn''t exist. I was calling fixtures :singular_table_name as opposed to
2007 Aug 14
4
(no subject)
How would you spec out something like the following: def a_method x = Class.new do include Enumerable end # do something here with x end describe "The Anonymous Class" do before :each do @anonymous_class = mock Class Class.stub!(:new).and_return @anonymous_class end it "should create a new anonymous class" do
2007 Mar 24
15
State Based vs. Behaviour Based Spec/Testing
I''ve notice that a project like Rubinius has both a spec & a test directory. Rspec has only a spec directory. Obviously I support BDD, but isn''t there also a place for state based/verification testing? I sometimes sense that I *do* want to practice Test Driven Development. That is, I want some assurance that my production code will run as intended. But I also
2007 Nov 21
9
''it'' duplicate example: BUG
I svn up''ed this morning, to get the following message with rake spec: /Users/smt/src/web/urbis/trunk/vendor/plugins/rspec/lib/spec/example/ example_group_methods.rb:96:in `it'': Duplicate example: ''should contain the total number of messages'' (RuntimeError) Anyone have any ideas why this might be going on? My specs were all passing last night. Let me
2007 Mar 27
10
sqlite3 and rspec_on_rails tests
As I think I previously mentioned, there is an incompatibility with rails 1.2.1 and sqlite3 3.3.8. see: http://weblog.rubyonrails.org/2007/1/29/using-sqlite3-with-rails and: http://weblog.rubyonrails.org/2007/2/6/rails-1-2-2-sqlite3-gems- singular-resources Sqlite is now at 3.3.13. Because of this, if a developer is trying to create a patch for rspec_on_rails, he will have one of the
2007 Apr 17
8
Verifying that a block calls a method
I have something like the following: def my_fun my_fun2 do raise Error end end I know that I can verify that the method receives my_fun2. How can I mock/stub out the example to verify that it calls raise Error? Scott
2007 Apr 01
4
rake w/rspec
How can I spec out a rake task? How can I use rake in my spec''s? I want to fix this rake spec:autotest bug with --drb and --color. How can I get rake output? How would I get out of autotest? My initial thought is just to run the command in the spec. Scott
2007 Jul 31
9
Any liberally-licensed open source projects out there that make good use of RSpec?
I''m trolling for example RSpec code. Any pointers appreciated. Cheers, Obie
2007 Apr 18
2
spec''ing a call to exit
How would I spec a call to exit? I can''t seem to stub it - rspec throws an error. Scott
2007 Feb 28
2
Fixture name not available as class variable in spec
Hi there, I can''t seem to access the fixture name as a class variable from my specs. I have to set the variable in the spec setup. ... [fixtures] my_fixture: id: 1 ... [rpsec] @my_fixture.id.should == 1 ... [error] You have a nil object when you didn''t expect it! The error occurred while evaluating nil.id ... [my setup] RSpec-0.7.5.1 (r1395) - BDD for Ruby Rails
2007 Apr 11
3
Suggestion: put svn url under "Contribute" section of site
Hello, I have been looking to submit a patch to RSpec, and I wanted to go about it the right way, so I loaded up http://rspec.rubyforge.org/contribute.html. The author of this page suggests that one should download from trunk to make any patches. It would be great if this section also included a url to the trunk. -Chris
2007 Sep 07
4
fixtures in before(:all)
I was planning on using a fixture within a description that didn''t modify the fixture, so I put it in a before(:all) block: describe "Customer", "xml" do fixtures :customers before(:all) do one = customers(:one) end # ... As a result, I got this message: 1) NoMethodError in ''Customer xml before(:all)'' You have a nil object when you