search for: hargraves

Displaying 20 results from an estimated 20 matches for "hargraves".

Did you mean: hargreaves
2008 Mar 17
8
should have_tag outside Rails
Hi Google has not helped me here. I''m looking for a way to use the have_tag assert_select wrapper outside RSpec on Rails (but in a Rails project) so I can use it to check text strings. Has anyone managed this? Thanks Ashley -------------- next part -------------- An HTML attachment was scrubbed... URL:
2005 Oct 19
2
rsync and o_direct
Hi We currently use rsync for various jobs at our company. We are now looking at using it to create an offsite synchonised copy of an Oracle 10g RAC archive logs area. The source area is on Oracle OCFS filesystem. The OCFS filesystem requires all reads/writes to be performed with the O_DIRECT option, thus bypassing cache. Oracle provide an updated coreutils package which includes the
2007 May 23
4
content_for
Any ideas how I would go about writing specs for views which make use of content_for? I''d like, for example, to be able to specify that ABC view places XYZ in the sidebar, which I do using content_for(:sidebar). Am I missing something obvious? Kyle
2007 Jul 24
11
Mock or Stub strategy for validates_uniqueness_of
Hi, I''m a bit stuck with mocking a unit test of a join model with regards to a validates_uniqueness_of clause. I have class Book < AR:B has_many :clippings various validates_presence_of etc end class Clip < AR:B has_many :clippings various validates_presence_of etc end class Clipping < AR:B belongs_to :book belongs_to :clip validates_uniqueness_of :clip_id,
2007 Jul 24
2
Dealing with nested/namespaced classes w/ describe
Hi all, Just wondering about this: I''ve been dealing with classes/modules nested in several layers of namespaces. Here would be an example of a describe block: describe ClassOne::ClassTwo::ClassThree, "description here" do ... end What would be the easiest way to write something a little more terse, like: describe ClassThree, "description here" do ... end
2007 May 24
2
mocking out helper method in a view spec
Hi, How can I mock or stub out a helper method that''s being called in a view that''s described by a view spec? Joe
2007 Dec 09
1
Story HTML Formatter
I recently noticed the HTML formatter for the story runner, but I''m unable to figure out how to make it function. ''ruby stories/all.rb --format html'' seems like it should work, in that --help works as expected, but I still get only plain text output. Maybe it''s not been wired up yet and/or this is a bug. Maybe I''m just being dumb. I have no clue at
2007 Nov 23
12
namespaced controllers
Out of curiosity, I''ve seen the following fail: module Admin describe MyController ... end end But this works fine: describe Admin::MyController .. end Why? Scott
2008 Jun 03
5
Autotest/RSpec 1.1.4/Rails 2.1 Infinite Loop?
I just got back from RailsConf, and upgraded on of my development apps to 2.1, and now autotest is going into an infinite loop. It runs tests continuously instead of waiting for files to be saved before rerunning. Has anybody else seen this, or know how to get around it? Thanks, Andrew
2007 Nov 09
26
RSpec on Rails 2.0
I have a project on edge rails that I''m trying to convert from Test:Unit to rspec. I have the rspec gem version 2338, the rspec and rsepc_on_rails version 2831 in vendor/plugins, and rails version 8117 in vendor/rails. I''ve been able to get a few specs passing, have gotten the specs running from autotest, and am able to do "rake spec:doc" and get the basic command
2008 Jun 07
2
Rails integration tests without stories
I''m looking to drive the development of a rails app that does nothing but serve a JSON API. All of the models are well tested elsewhere, so I needn''t worry about that. My only immediate goal is to be able to fire off requests to a path and check the returned JSON. I''ve tried a number of methods for this today, without being particularly enthused about any of them. I
2007 Jun 15
6
problem getting started with stubbing in rails controller specs
Hello, Ingo! I''m copying your question to a new e-mail instead of replying to try to keep message threads separate. Have you tried setting up your expectation before issuing the get statement? For example, take this out of the setup block: get ''index'', :locale => ''en'' and move it after:
2007 Nov 12
15
it "should [action] ..." vs it with an active voice
I''d like to start gathering information/debating on the advantages/disadvantages of using it "should ..." vs other techniques. Dan North explained why we should use should: http://dannorth.net/introducing-bdd/ I used to use it "should ..." for the projects I was on, until I was challenged by a fellow developer who started using it with an active voice. For example
2007 Dec 28
3
Converting to Rails 2.0.2
I''m moving an older project to Rails 2.0.2 and ran into a roadblock on the version matching. Here''s script/console session: >> Spec::VERSION::REV => "1785" >> Spec::Rails::VERSION::REV NoMethodError: undefined method `run='' for Test::Unit:Module from /Users/sxross/rails/tastie_work/vendor/plugins/rspec_on_rails/ lib/spec/rails.rb:16 from
2008 May 03
11
Date comparisons
I occasionally get this error: 1) ''A puzzle once featured, should no longer be nominated'' FAILED expected: Sun May 04 09:10:26 -0700 2008, got: Sun May 04 09:10:26 -0700 2008 (using ==) ./spec/models/puzzle_spec.rb:180: So, the dates looks the same to me. Any ideas for how to debug? Joe
2008 May 11
5
Are you writing "imperative" or "declarative" scenarios in your stories?
Hey all, I just found Bryan Helmkamp''s (of webrat fame) slides on a presentation he did at GoRuCo 2008: http://www.brynary.com/2008/4/26/story-driven-development-slides-posted On slides 21-24 he talks about writing good stories and shows gives two examples.. the way not to do it and the way to do it. You can also see the video of the presentation at confreaks
2007 May 30
18
autotest and rspec_on_rails not happy
Hi, I''ve been using the rspec and rspec_on_rails plugins quite happily on my Rails project for a while now. Today I noticed the autotest support in RSpec-1.0.3 and decided to give that a spin. Oh tragedy! $ autotest loading autotest/rails_rspec ./vendor/plugins/rspec_on_rails/lib/autotest/rails_rspec.rb:33:in `initialize'': undefined method `singularize''
2007 Dec 13
16
"Tricks" for testing after_create callback???
I''ve got a model Message, which needs to send an email using action mailer after it''s first saved in the database. I want to pass the model to the mailer which then uses methods on the message model to render the email. So the natural way to do this is in an after_create callback on the Message model. But I can''t see an easy way to test this. Here''s my spec
2016 Jun 27
2
non-standard (PCI) Serial port
I'm trying to get isolinux serial port working on a system. Using UEFI boot mode but system does not have Legacy Serial port (3f8, etc) enabled. Serial port devices are PCI devices, memory mapped I/O with 32-bit offset. Using linux kernel command line console=uart8250,mmio32,xxxx,115200n8 works. However I do not see syslinux/isolinux boot menu. Looking through the code it looks like
2005 Oct 25
0
Fwd: rsync and o_direct
Guys, posted this last week and had no response so far. Just posting again in case anyone missed it. I really could do with knowing as it's delaying the rollout of a new project I'm working on. Thanks, Simon -- Hi We currently use rsync for various jobs at our company. We are now looking at using it to create an offsite synchonised copy of an Oracle 10g RAC archive logs area. The