similar to: Quiet Backtrace in RSpec

Displaying 20 results from an estimated 3000 matches similar to: "Quiet Backtrace in RSpec"

2007 Aug 13
2
Backtrace tweaker - broken or me?
Using 1.0.8, I just realized that I''ve been scrolling through pages of backtraces when rspec is supposed to clean them up for me. This is a new development machine, so I''m not sure if older versions worked or not. I''m running Ruby 1.8.6, Rails edge, Mac OS X 10.4.10. I''ve verified that the QuietBacktraceTweaker is the one that''s running.
2007 Jul 14
3
expect_render twice in views
I found this: controller.expect_render(:partial => ''thing'', :collection => things).once but I am trying to expect_render twice in my view spec: template.expect_render(:partial => ''order_details'').twice This doesn''t work as the template.expect_render call seems to be returning an array. Is it possible to expect the rendering of a partial
2007 Jul 06
5
Outside-In with RSpec on Rails
I just read ''Mocks Aren''t Stubs'' and was intrigued by the notion of ''outside-in'' TDD. As a Rails developer, I''m curious if others are employing this method when developing Rails applications using RSpec. Is it common practice (or even practical) to drive the development of a Rails app by starting with view specs, then controller specs, then
2007 Sep 20
4
alias :calling :lambda
Sprinkling my examples with ''lambda'' has always seemed like a bit of a wart to me. I''ve gotten into the habit of adding ''alias :calling :lambda'' to my spec suites. My examples then look like: calling { Foo }.should raise_error calling { Bar }.should_not raise_error Is there a reason that RSpec core has chosen not to make exception expectations more
2007 Nov 11
4
Who''s using --format rdoc
I''m doing some housekeeping and just realised that the rdoc formatter produces gibberish: http://rspec.rubyforge.org/rdoc/files/EXAMPLES_rd.html Will anyone protest if I just go ahead and remove it? (I can''t imagine anyone using it, especially with the much better HTML formatter) Aslak
2009 Jun 07
6
Missing Template when testing with the Brain Buster Captcha partial
When I run my functional tests, they throw an error with the following message: ActionView::TemplateError: Missing template /_captcha.erb in view path app/views:test/vendor/plugins/brain_buster/views/brain_busters On line #23 of app/views/contacts/_form.html.erb 20: <%= f.label :message %><br /> 21: <%= f.text_area :message %> 22:
2009 Feb 05
3
[Cucumber, Webrat] Error backtraces shown as HTML in console
Since upgrading to Cucumber 0.1.99.19 I''ve noticed that the backtraces appearing in the console output are of the form: Page load was not successful (Code: 500): Followed by the dump of the rails error page. That page looks fine in a browser, and it''s helpful enough to see it when save_and_open_page does its thing, but I''m pretty used to reading plain old
2008 Feb 18
5
uh... fixtures?
RSpec-ers: I''m aware this is quite the FAQ. I have probably asked it myself, but I just can''t Google up anything but others asking it. I grabbed the source to Beast, to use as a Rails project uninfluenced by me, or RSpec. Then I installed the CURRENT version of RSpec and rspec_on_rails, and set up a model spec on Post. Here''s the spec_helper.rb lines:
2008 Mar 04
10
Pretty story output for non-Rails project
I''m taking my first fledgling steps driving a new ruby (non-rails) project with BDD. I''ve got a (test) story working. However, when I run the story in TextMate (via command-r), the output is plain text. See: http://skitch.com/georgeanderson/8grg/run-examples How do I get the output to look pretty (formatted)? rspec-1.1.3 OS X 10.5.2 TextMate v1.5.7 (1455) Thanks, /g --
2007 Mar 12
2
utc
I''m having a helluva time getting Date.today.utc to resolve - "undefined method `utc'' for #<Date: 4908343/2,0,2299161>" model usage in before_create filter is : activated_at = Date.today.utc I''m not stubbing out Date (should I be? [ stub(Date, :utc => Date.today) didn''t help any ]. The before filter is working fine within the app, but
2013 May 02
1
function gstat r with pyhton
? stato filtrato un testo allegato il cui set di caratteri non era indicato... Nome: non disponibile URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20130502/8bc15613/attachment.pl>
2008 Sep 02
4
Attachment_fu, Paperclip, & S3
For various reasons, I made a git branch and installed Paperclip in place of attachment_fu. Paperclip works great except that images seem to have lost some quality; edges have gone a little too jaggy to be able to drop attachment_fu just yet. After a post on the Paperclip Google Group, someone suggested the :convert_options could be passed additional attributes, like ''quality'',
2006 Jul 27
25
Why are has_one objects resaved when the parent is saved?
If the associated object of a has_one association has been loaded, it is resaved when the parent is saved. Eg: class Person < ActiveRecord::Base has_one :user end class User < ActiveRecord::Base belongs_to :person end p = Person.find(:first) p.save # As expected, nothing happens with the user association p.user # Loads the associated object p.save # As well as saving the person, the
2009 Mar 31
7
[Cucumber] Running single feature from command line
I am using Cucumber 0.2.3 and am having problems running a single feature. In particular, the cucumber Textmate bundle was not working so I traced it back and discovered that I could not run single files or features from the command line either. My setup has the following line in cucumber.yml default: -r features/support/env.rb -r features/support/plain.rb -r features/steps
2007 May 30
9
Specify attr_protected
This is kind of a two part question. Question One: I want to be sure that an Order model is protecting sensitive attributes from mass assignment. The example looks like this: describe Order do it "should protect total attribute from mass assignment" do @order = Order.new(:total => 0.05) @order.total.should_not == 0.05 end end And the code to implement it: class Order
2007 Oct 18
4
Mocking models provided in Rails plugins
Hey folks, How do I mock a model that is given to me by a Rails plugin? I''m trying to mock Session from the restful_authentication plugin but I get a number of errors telling me RSpec doesn''t recognize Session. NameError in ''SessionsController handling GET /sessions/new should be successful'' uninitialized constant Session An example of my usage:
2008 Jan 10
21
Shoulda
Hey, we''re currently using shoulda (http://dev.thoughtbot.com/ shoulda/) on a project and I saw some things that would be really nice to see in rspec, namely the should_ methods, and especially the should_be_restful method. Do these go against the rspec goals at all? Or could an ambitious programmer go to town implementing these for rspec_on_rails? Nathan Sutton fowlduck at
2007 Dec 07
4
TextMate Sidebar
Hey David, I just watched the RubyConf recording of your RSpec session and noticed that you''re using a modified version of TextMate that uses a sidebar instead of a project drawer. Where did you find that mod? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/rspec-users/attachments/20071207/c900e1bc/attachment.html
2007 Apr 07
5
Integration Specs On Rails
Now that RSpec is nearing 1 dot oh, are there any plans to implement an integration testing equivalent in RSpec On Rails?
2009 Sep 15
6
User login and authentication
Being a rails newbie, I started to design our first rails-based webapp. This app should not only be used via browsers, but we also want to provide a (RESTful) api. I love the ''convention over configuration'' paradigm, but am totally clueless on what to do when it comes to user authentication. Is there a THE rails-way of doing this? I found many excellent gems and plugins, such as