search for: helmkamp

Displaying 20 results from an estimated 21 matches for "helmkamp".

2008 May 14
4
Reuse steps like a method call
...s so: Given "a user named $username" do |username| .... end Is there a way to call it from another step? For example: Given "a user named $username with a blog post |username| given_a_user_named(username) # calls existing step code # create a blog post end Cheers, -- Bryan Helmkamp http://brynary.com -- My blog
2007 Nov 29
5
Webrat 0.1.0 released - Ruby Acceptance Testing for Web applications
...39;m shipping 0.1.0. (Patches welcome. :) ) Code is available at: http://svn.eastmedia.net/public/plugins/webrat/ What do you think? -Bryan Here''s the README: ----------------------------------------------------------- = Webrat - Ruby Acceptance Testing for Web applications by Bryan Helmkamp <bryan at brynary.com> and Seth Fitzsimmons <seth at mojodna.net>. Initial development sponsored by EastMedia (http://www.eastmedia.com). == DESCRIPTION: Webrat lets you quickly write robust and thorough acceptance tests for a Ruby web application. By leveraging the DOM, it can run t...
2006 Oct 06
8
Expecting calls with two different parameters
Hello, I''ve just started using Mocha in the tests for my Rails app, and I''ve run across an issue with mocking a method that should be called with different parameters. How would I setup a mock that expects that a method will be called once with no paramaters, and a second time with a parameter? I''d be tempted to shortcut and just do something like
2007 Jan 09
6
spec not running in TextMate
I tried running a spec with command-r in TextMate and got: /Library/Application Support/TextMate/Bundles/RSpec.tmbundle/Support/ lib/spec_mate.rb:1:in `require'': No such file to load -- rubygems (LoadError) from /Library/Application Support/TextMate/Bundles/ RSpec.tmbundle/Support/lib/spec_mate.rb:1 from /tmp/ temp_textmate.GplhPr:3:in `require'' from
2007 Feb 17
4
RSpec usage
Hey all, Trying to get feel for RSpec usage so I''m taking a straw poll... What''s the largest project you''ve used RSpec on in terms of app LOC app and spec LOC? Also, how long have you been using RSpec in "production" code? -Bryan
2008 May 03
9
Any news on the rSpec books?
I admit it, when it comes to rSpec, I''m lazy. I''ve made a few feeble attempts to use it, but for once I''m waiting for a book-length treatment. At least two books were announced, I think. Can anyone in the know please report on their progress? Thanks Michael -- Michael Schuerig mailto:michael at schuerig.de http://www.schuerig.de/michael/
2006 Oct 08
9
Organizing tests and mocha expectations
I''m simultaneously getting into using Mocha and RSpec-style tests (courtesy of the simply_bdd plugin) and I''m struggling with some issues while trying to organize my specs/test. Here''s a code example illustrating the problem: context "update cliient invalid data" do include ClientsControllerSpecHelper specify "should render edit form" do
2007 Dec 20
19
Story runner rake task
What''s the status on a rake task for the story runner. If nothing is in progress, where could I start to try and build one? JD
2007 Mar 19
24
alias method spec?
I am completely baffled by this one - My guess is that there is no pure ruby way to do this - but how could I set up a spec to test that one method is an alias of another? Thanks for any help, Scott
2007 Oct 18
6
spec:models depends on development db:migration
For those interested .... rake spec:models seems to clone the test database from development. If your dev db is empty, the models task fails mysteriously. Anyway, to make sure your dev db is at the current migration version, I added this dependency in lib/tasks task ''spec:models'' => ''db:migrate'' Now the dev db is migrated up with each test pass. Keith
2006 Oct 17
4
Mocking the rendering of a Rails template
Hello all, I''m having difficulty setting up mocks such that I can verify that Rails was going to render the right template file (for example new.rhtml) and stop Rails from performing the actual rendering. After peeking at Rails'' internals, I tried two techniques as illustrated here: http://pastie.caboo.se/18197 Neither worked. I think the first one failed because Rails
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 th...
2008 May 13
1
user stories for load testing?
Hi all, We''ve recently been kicking around different ideas for simulating user behaviour for the purposes of load testing our backend. We hit on the idea of having user stories do double duty for both verifying behaviour and (if selected stories were driven en-masse by a distributed network of clients) for application load testing. I googled around a bit and didn''t find
2006 May 20
1
Rails Day 2006 -- 24 hour programming contest on July 17th
I just launched the website for Rails Day 2006, the second annual 24 hour Ruby on Rails development contest. Teams of one to three people have 24 hours to develop a Rails application from scratch. When the contest is over, entries are judged, and cool prizes are awarded. http://www.railsday2006.com/ Sponsoring Rails Day is a great way to promote your company to the geek demographic. If
2003 Mar 17
1
Seperate servers for home directory space and logins
I'm trying to run the PDC for my domain on a seperate server from the home directory space. Also, I want each user to be able to FTP in with their domain username and password and access files in their home directory and only -their- home directory. It seems that I would need a seperate linux account for every user on the home directory server in order to fulfill my FTP requirement. Then
2007 Mar 25
3
New Style: describe-it instead of context-specify
Hello, in the tunk, i found a new style for spec: describe Foo do it "should do bar" do ... end end instead of context "Foo" context "should do bar" ... end end The Rails-Textmate-bundle in trunk use only the new "describe-it" style, What are the reasons for the new style ? Shall i use the new style from now on ? Hussein
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?
2007 Mar 29
21
a better "should have valid associations"
This is pretty much the same as last time around, if you recall. Thanks to Wilson for converting to the new form. I''ve added a few lines. Basically, it iterates over your model associations and does two things. - First, just try to call the association. Usually fixes speeling erors or other such silliness. - Second, try to find a record with an :include on the association. This
2007 Dec 29
5
./script/story command
...ns, more_steps And that will override the default behavior. I''m posting this because I hope it might be of immediate use to others using plain text stories right now, and also because I would like to consider possibilities for getting this functionality into RSpec core. WDYT? -- Bryan Helmkamp http://brynary.com -- My blog ----------------------------------------------- #!/usr/bin/env ruby class StoryCommand ROOT_PATH = File.expand_path(File.dirname(__FILE__) + "/..") STORIES_PATH = "#{ROOT_PATH}/stories/scenarios" STEP_MATCHERS_PATH = "#{ROOT_...
2007 Feb 28
12
Specifying that code is called in a block
Not sure if this is possible currently. I have a section of code like this: ActiveRecord::Base.transaction do cow.save! duck.save! dog.save! end (Names changed to protect the innocent.) I''d like to specify that the saves run in a transaction. I can do ActiveRecord::Base.should_receive(:transaction).and_yield But is there any way to specify that the code is