Comments on: rails 2 day 3: behavior-driven development /2008/12/rails-2-day-3-behavior-driven-development/ Sarah Allen's reflections on internet software and other topics Tue, 04 Oct 2011 03:41:59 +0000 hourly 1 https://wordpress.org/?v=5.7.1 By: Sarah /2008/12/rails-2-day-3-behavior-driven-development/#comment-349 Tue, 04 Oct 2011 03:41:59 +0000 /sarahblog/2008/12/rails-2-day-3-behavior-driven-development/#comment-349 I believe webrat is designed to work with rack apps, so it would work with Sinatra, but not PHP. If you want to work with a non-Ruby webapp, look at Capybara using the Mechanize driver. I wrote a short blog post about that here: /sarahblog/2011/02/legacy-testing-with-capybaramechanize/

]]>
By: cyprian /2008/12/rails-2-day-3-behavior-driven-development/#comment-348 Tue, 04 Oct 2011 03:08:44 +0000 /sarahblog/2008/12/rails-2-day-3-behavior-driven-development/#comment-348 Sarah, thanks so much for sharing your efforts. One question I have is this:
Do you have to use the ruby-rails framework to get webrat to work? Can you just use garden-variety ruby? It seems from all the sites I have visited, and the Rspec/Cucumber book I’m using that webrat is tightly coupled to Ruby-rails.

Any insights you could share would be most appreciated.

]]>
By: Cucumber quicksetup at Pablo Cantero /2008/12/rails-2-day-3-behavior-driven-development/#comment-346 Sat, 23 Oct 2010 02:06:24 +0000 /sarahblog/2008/12/rails-2-day-3-behavior-driven-development/#comment-346 […] rails 2 day 3: behavior-driven development […]

]]>
By: Sarah /2008/12/rails-2-day-3-behavior-driven-development/#comment-345 Mon, 23 Feb 2009 15:49:12 +0000 /sarahblog/2008/12/rails-2-day-3-behavior-driven-development/#comment-345 To resolve the missing ‘a’ issue, see: http://wiki.github.com/aslakhellesoy/cucumber/troubleshooting

]]>
By: Matthew Platte /2008/12/rails-2-day-3-behavior-driven-development/#comment-344 Mon, 23 Feb 2009 04:40:49 +0000 /sarahblog/2008/12/rails-2-day-3-behavior-driven-development/#comment-344 The missing “a” on Windows is a known bug (I’m too lazy to provide a url).

]]>
By: shane smith /2008/12/rails-2-day-3-behavior-driven-development/#comment-343 Sun, 22 Feb 2009 21:57:30 +0000 /sarahblog/2008/12/rails-2-day-3-behavior-driven-development/#comment-343 Thank you for this tutorial.
Webrat now has a “When I go to(.+)$/” step.
If you put the path webrat should visit in features/support/paths.rb, then webrat should be able to folow the “When I go to the tasks page” directive.

]]>
By: Hoornet /2008/12/rails-2-day-3-behavior-driven-development/#comment-342 Sun, 22 Feb 2009 15:37:04 +0000 /sarahblog/2008/12/rails-2-day-3-behavior-driven-development/#comment-342 Hello! I have another problem on winXP. After running rake featurer in your “Describe a Feature” chapter, this is what I got. It’s OK, but there are no letters ‘a’ !!!!!
Any ideas?

Code begin:

E:SOURCERAILSrails-2-day-3-behavior-driven-developmenttodolist>rake features

(in E:/SOURCE/RAILS/rails-2-day-3-behavior-driven-development/todolist)
´?? # fetures/tsklist.feture
Feture: Tsks
In order to keep trck of tsks
People should be ble to
Crete list of tsks
Scenrio: List Tsks # fetures/tsklist.feture:7
Given tht I hve creted tsk “tsk 1” # fetures/tsklist.feture:8
When I go to the tsks pge # fetures/step_definitions/webrt_st
eps.rb:6
Then I should see “tsk 1” # fetures/step_definitions/webrt_s
teps.rb:89

1 scenrio
2 steps skipped
1 step pending (1 with no step definition)

You cn use these snippets to implement pending steps which hve no step definitio
n:

Given /^tht I hve creted tsk “tsk 1″$/ do
end

E:SOURCERAILSrails-2-day-3-behavior-driven-developmenttodolist>

]]>
By: Ted Roche /2008/12/rails-2-day-3-behavior-driven-development/#comment-341 Fri, 06 Feb 2009 21:07:46 +0000 /sarahblog/2008/12/rails-2-day-3-behavior-driven-development/#comment-341 Great tutorial. However, webrat has gotten ahead of you, I think. With webrat 1.12, it generated a

#When /^I go to (.+)$/ do |page_name|
# visit path_to(page_name)
#end

which I just commented out to finish the tutorial. Properly, I suspect I should have worked out path_to, but I was focused on making the tutorial work…

]]>
By: Joe Darling /2008/12/rails-2-day-3-behavior-driven-development/#comment-340 Tue, 03 Feb 2009 19:24:41 +0000 /sarahblog/2008/12/rails-2-day-3-behavior-driven-development/#comment-340 Great tutorial. I have been really struggling to find this type of step by step guide that is both up to date and covers BDD. Thanks very much.

Two minor things: When I did the rake db:migrate only the development database was migrated and the tests are run on production by default. Once I changed RAILS_ENV and ran the migration again all worked.

Second: I think the webrat dependency problem has been sorted out. I just used the gem install version and the example worked OK.

]]>
By: Sarah Allen's Weblog /2008/12/rails-2-day-3-behavior-driven-development/#comment-339 Sat, 27 Dec 2008 15:35:37 +0000 /sarahblog/2008/12/rails-2-day-3-behavior-driven-development/#comment-339 situated learning through open source

I just read Situated Learning: Legitimate Peripheral Participation by Jean Lave and Etienne Wenger, which I put on my wish list since I am a total geek about theories of how people learn, particularly with regard to social learning. It’s a challenging …

]]>