similar to: Preconditions

Displaying 20 results from an estimated 11000 matches similar to: "Preconditions"

2007 Sep 04
16
Failure Messages in RSpec
Having used JUnit and Test::Unit, I''m quite used to having the ability to insert a failure message, which helps when tests fail. For instance, the example RSpec that is generated for a model class specifies that the model class is valid. Assuming this were supposed to be true, and it failed, I''ve now got to duplicate the code in the test in order to find out why it
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
2007 Sep 09
11
Going beyond the default html formatter/report?
Hi! I wonder does anybody planning to go beyond the default html formatter/report? The current html report is nice and green but what about to go a little silly and enable also user input. For example to let customer to add a new pending spec, comments etc. I feel it might be mentally easier for some customers to jump into spec world when it is possible to give input at "the same
2007 Sep 05
4
False Positives and Autotest on New Folders
False Positives I just discovered how easy it was to create a false positive when I, trying my first RSpec test, did this: ob.should eql?(''foo'') instead of: ob.should eql(''foo'') or: ob.should == ''foo'' As far as I can see, this is roughly equivalent to: ob.should false Neither eql?(''foo'') nor false causes the spec
2007 Oct 05
4
have_xml_tag
Hi Was just using have_tag on an xml response and found the problem outlined and resolved here http://weblog.jamisbuck.org/2007/1/4/assert_xml_select Just wondered if there is any support in rspec? Cheers Shane Shane Mingins ELC Technologies (TM) PO Box 247 Santa Barbara, CA 93102 Phone: +64 4 568 6684 Mobile: +64 21 435 586 Email: smingins at elctech.com AIM: ShaneMingins Skype:
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 Oct 05
2
Rails, rSpec edge problems
Hi, Does the Story Runner work on edge rails? I thought that is what the example app was using but I am on the latest Rails and latest rSpec revisions and I am having problems. When I call ''render_template'' in a story I get the following: NoMethodError: undefined method `render_template'' for #<ActionController::Integration::Session:0x327d974> Do I need to
2007 Oct 01
1
have_tag and line numbers
When I''ve got a view example like this: 1: response.should have_tag "fieldset#children" do 2: with_tag "child" 3: end If it can''t find ''child'', the error seems to come back as my_spec.rb:1 instead of my_spec.rb:2. Has anyone else experienced this? I just spent a while tracking down what I assumed was a problem in my have_tag only to
2007 Oct 05
1
Rake & Story Runner
So, having gotten a story (i.e. Story Runner) working (runs in NetBeans and using ''ruby path/to/story.rb''), I''m looking to see how I''d integrate that with our build. Am I right in assuming that there''s no Rake integration yet, or a report? I couldn''t see any. As far as I can see, "rake spec" doesn''t run or report on my
2007 Oct 04
7
Using Predicates to look at an array..
Hi all, I have an array of shipping_type''s being returned, and I want to see what is in there. In the past I have done: shipping_type.include?(Cart::SHIPPING_TYPE_REGULAR).should be_true This works, but looks really ugly.. It just doesn''t roll of the tongue very well. I then looked up the use of Predicates, which I had been using, but hadn''t realized:
2007 Oct 04
1
PUT- or POST-ing xml
I''d like to write a test of a REST service wherein XML is submitted as the request entity. In Test::Unit on Rails, this seems to be possible in an integration test, but not in a functional test. RSpec uses the Rails functional test framework, as far as I can tell, so it suffers the same result; it tries to symbolize the keys of the ''parameters'' hash, except the
2007 Sep 05
6
Caveman Questions
Hello! I''m just a caveman with some caveman questions. I''ve been parsing Rspec for quite a while, and I''m writing my first series of specs. My initial impressions are "Verbose, but understandable. Helpful and intuitive, but so much to digest." I want to congratulate the folks who are dedicating a chunk of their lives to writing this, and ask 2 caveman
2007 Sep 05
4
Content assist for spec files
Hi there, I''m working on Ruby support for NetBeans, and we''re bundling RSpec (along with JRuby). One thing I''d really like to fix is having content assist (code completion / intellisense / code insight, it has many names) work inside your spec files such that you can not only hit ctrl-space and see "describe", "before", "it" etc.
2007 Nov 18
12
Lighthouse and Engine Yard sponsorships
Hey all, I''m very happy to announce that ActiveReload[1] has generously offered to sponsor a lighthouse[2] account for rspec. We''ll be moving ticket tracking there. We''ve already got the account set up and will soon make it public. We''re also going to be getting a sponsored slice at Engine Yard[3] to host source control, which will be either mercurial or git
2007 May 18
3
Fixtures considered harmful?
I''m trying to get really serious about doing true BDD for a new Rails project, and I note that at <http://rspec.rubyforge.org/documentation/ rails/index.html> it says: "we really don?t recommend the use of rails fixtures" On the same page it also says (about Model specs): "these are the only specs that we feel should actually interact with the database"
2007 Sep 24
2
Is Rcov working with Jruby now?
Hello everyone: I am currently assigned to test a big project which uses JRuby to build a web application. The reason of using JRuby is the web application is communicating with Java Service. I am writing test cases using Rspec and looking for a code coverage tool. Rcov is no doubt a nice code coverage tool. However, it is said that Rcov is not compatible with JRuby so far. Sigh....I can not
2007 Aug 10
3
FixtureScenarios
This may have turned up in the RSS feeds of many of you already, but for those who haven''t seen it yet, looks intersting: <http://errtheblog.com/post/7708> > The main problem with fixtures, for me, has always been how unfun > they are. They literally suck the fun out of anything they?re > around. You throw them in your test/ directory, then suddenly > testing
2007 Sep 12
12
Philosophical questions
Disclaimer: The following are observations by a relatively new user (couple of weeks) of RSpec and not intended as RSpec trollbait. Also, forgive me if similar topics have been discussed elsewhere on the mailing list. I at least did the due diligence of a quick search. That said... I''ve been positively thrilled with RSpec for use outside of Rails. It has been in my attempts
2007 Jul 29
24
View-Driven-Development by Behavior-Driven-Development and RSpec
One of the things that turned me on to BDD and RSpec was speccing views first, that the desired end would drive the development. In previous projects while using Test::Unit I would try to make educated guesses as to what would be needed in the model and controllers to derive the view without actually writing the view until afterwards. This is all because testing relied on each previous
2007 Jun 27
5
Mosquito Fixtures Won''t Load
I can''t get fixtures to load correctly in a Mosquito test. The first fixture loads in the unit test, but the rest don''t load at all. File structure: tracker/ tracker.rb test/ test_tracker.rb fixtures/ tracker_measurements.yml tracker_projects.yml Relevant test code: require ''rubygems''