search for: colaiuta

Displaying 20 results from an estimated 31 matches for "colaiuta".

2007 Jun 08
5
autotest bug?
Autotest is running continuously - even when the files mtimes aren''t changing. I believe this only happens if using a failures file. autotest -v gives me: euclid% autotest -v loading autotest/rails_rspec /opt/local/bin/ruby -S script/spec -O spec/spec.opts spec/ controllers/log_entries_controller_spec.rb spec/views/login/ new_spec.rb spec/controllers/login_controller_spec.rb
2007 Oct 18
12
first cut at blockless given/when/then
Hi all, I committed a first cut at blockless Givens/Whens/Thens to RSpec''s trunk: cd /path/to/rspec/project svn up cd rspec bin/spec examples/story/calculator.rb Take a look at examples/story/calculator.rb to see what''s going on. Needs docs!!!! Thoughts welcome. I''ve also got a cut at the plain text parser checked in, but it''s not hooked up to anything
2007 May 24
25
Specs for ApplicationController, where to put them?
The Rails ApplicationController (app/controllers/application.rb) serves as an abstract superclass for all other controllers in a Rails application and is a good place to put methods and filters which you want all of your controllers to use. In my case I''m using it to provide methods such as "current_user" and "logged_in?" etc. By default, RSpec
2007 Jun 22
11
Nicer failure message formatting
Hi Are there any tools around that make rspec''s failure messages easier to read? unit_diff from ZenTest doesn''t seem to work - unless I missed something. A simple but very helpful improvement would be to use more line- breaks, e.g. Current output: expected "this is a very long string blah blah", got "this is a very very long string blah blah" (using
2007 Oct 21
8
Interesting shared behaviour side-effect
Given the following ApplicationController specs: describe ApplicationController, "one facet", :shared => true do it ''foo'' ... it ''bar'' ... end describe ApplicationController, "some other facet", :shared => true do it ''abc'' ... it ''xyz'' ... end describe
2007 May 24
15
Specs for code stored in rails_app/lib/
Where should the specs go for code in the "lib" directory of a Rails app? I made a folder, "spec/lib/", for storing such specs, and RSpec automatically picks them up when run using "rake spec". Before I go ahead and patch rspec_on_rails/lib/autotest/ rails_rspec.rb so that autotest can monitor these specs I''d like to ask whether this is the
2007 May 22
3
BDD screenscast
I posted a quick screencast demonstrating some BDD with RSpec yesterday: http://wincent.com/a/about/wincent/weblog/archives/2007/05/ behaviourdriven.php I''m a C/Objective-C programmer who knows a bit of Ruby, almost nothing about Rails, and in BDD I can really only claim "new but interested" status. It''s not scripted, it''s totally improvised and
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 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
2007 Oct 14
40
Step matchers
I think we all know that the readability of steps isn''t great right now, and in fact there''s a very recent thread that discusses just that. It was that recent thread that prompted me to explore this a bit. The basic idea is that you define step matchers, which have a regex, and then you match step names against that regex. Kind of tough for me to explain so I''ll just
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 May 19
1
RSpec 1.0.0 and a couple of other things
First up, congratulations to the team on RSpec 1.0.0! RSpec is one of the most vibrant and professionally-run projects in the world of Ruby open source. Now that there is a commitment to a stable API I think we''ll see RSpec really take off. Two quick things... In the absence of official Spec::UI docs, can Spec::UI be installed as a Rails plug-in? eg. script/plugin install
2010 Jun 18
1
[PATCH] option_groups_from_collection_for_select should produce an HTML-safe string
Can somebody please review my ticket: https://rails.lighthouseapp.com/projects/8994/tickets/4879 It''s a trivial bugfix ("option_groups_from_collection_for_select should produce an HTML-safe string") before RC, I think. Cheers, Wincent -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group,
2007 May 21
9
Ordering in view specs using have_tag and with_tag
When writing view specs is there any way to test not only for the presence of tags (have_tag) and nested tags (with_tag), but also test that they appear in a given order? For example, consider the following: it ''should display the login names, display names and email address in alternating rows'' do response.should have_tag(''div.odd>div'') do
2009 Apr 29
1
Cucumber/Webrat/Selenium + SSL?
Has anybody had any luck getting Cucumber, Webrat and Selenium to play nicely together for SSL sites? My test environment: - nginx front-end accepting SSL requests, proxying them to mongrel back-end - mongrel back-end accepting normal HTTP requests - application routes configured with ":protocol => ''https''" so that URLs generated with "_url"
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 Sep 07
12
Preconditions
Sorry, lots of questions these days. Is there a normal approach for preconditions? In JUnit, I might put a few assertions in the setUp() just to make sure that the test ''data'' I''ve created meets expectations before going to test it. So, for instance, I''ve got an object that is audited using acts_as_audited and I''d like to test the XML that results
2010 Jul 08
2
rspec-rails how to selectively turn on csrf protection for controller specs?
I''m setting up a Paypal IPN listener and need the create action to not use rails'' default CSRF protection. I''ve got that working fine & test it actually works with cucumber (where I''ve turned CSRF back on, since it''s full-stack testing) but would like my controller spec to mention the need for protect_from_forgery :except => [:create] (and fail
2007 Oct 15
4
Stories location
Should the stories dir be located on the project root? I was expecting to find it located under spec/ but there isn''t anything there, just the stories dir off of /. Also there don''t appear to be any rake tasks for stories, nor generators. Should there be any? Thanks, Steve
2007 Oct 03
4
TextMate language weirdness
I''m having trouble with TextMate and assigning the RSpec language to *_spec.rb files within rails projects. Here is what is happening: I''m in a file that has the language "Ruby on Rails" selected. I do a ctrl-shift-down to switch to the corresponding _spec.rb file. The _spec.rb file has the language "Ruby on Rails" selected. I change the language to