similar to: RailsStory - lessons learned

Displaying 20 results from an estimated 1000 matches similar to: "RailsStory - lessons learned"

2007 Oct 16
6
RailsStory runner - empty response
I generated a new rails app then installed rspec and rspec_on_rails from trunk. I then created a sample story: require File.dirname(__FILE__) + "/helper" Story "View Home Page", %{ As a user I want to view my home page So that I can get a birds eye view of the system }, :type => RailsStory do Scenario "Publisher with no videos" do When
2007 Nov 08
5
Running specs in reverse
There is an option "--reverse" to run examples in the reverse order which is good for detecting inter-dependencies between examples. Is it feasible for rspec to automatically switch between "forward" and "reverse" order each time a spec is run? My goal is to detect inter-dependencies sooner than later... Thanks Alvin.
2007 Dec 12
3
undefined method: controller_name
With rspec 1.0.8 I have a spec in the directory: spec/units/controllers/application_controller_spec.rb require File.dirname(__FILE__) + ''/../../spec_helper'' class DummyController < ApplicationController def index raise "Prevent index from rendering" end end describe ApplicationController, "Handling errors in production", :behaviour_type =>
2007 Oct 12
1
Edge rspec - running Test::Unit tests
With rspec 1.0.8 I can run Test::Unit tests and rspec tests using: rake default and all tests and specs run. With edge rspec the Test::Unit tests return with the message: [list of tests] Finished in 4.5e-05 seconds 0 examples, 0 failures How can I get Test::Unit and rspec to happily co-exist again? Thanks, Alvin
2007 Nov 13
7
rails story runner returning a nil response code
Has anyone noticed any problems with the Rails story runner returning a response code of "0" when doing get/post/etc methods? I just grabbed the latest rails/rspec and just started noticing this problem, http://pastie.caboo.se/117497 Regular controller specs pass as expected. -- Josh Knowles phone: 509-979-1593 email: joshknowles at gmail.com web: http://joshknowles.com
2006 Aug 12
1
Strategy pattern: comparing Context/Specify to Given/When/Then
Comments and suggestions for improving the specifications are welcome. Thanks, Alvin One example comparing context/specify (CS) with given/when/then (GWT) with a strategy pattern follows: Consider a pipeline transporting oil supplied by multiple partners. The amounts transported on behalf of each partner are recorded as transactions in a general ledger. There are multiple approaches to
2008 Jun 09
6
Selenium/Watir usage along side Webrat in story testing
This is related to Selenium/Watir usage along side webrat in story testing. MHS_Testing and Rspec-ui provide some great help for testing through frameworks like Selenium/Watir. But there is something missing, Webrat has changed the landscape somewhat with Acceptance Tests/Story Driven development. Now I have a choice: 1. Tests and rails process run as one test process (Webrat) 2. Use
2007 Nov 13
3
Story problem if parenthesis used in Given, When, Then or And
VERSION: rspec rails plugin current edge version XP/Cygwin on XP Hi, I hit this when trying to use parenthesis in my stories ... (that''ll teach me!). If a scenario looks like the following: Story "User has story with parentheses", %{ As a user I want parenthesis So that ... well I just do }, :type => RailsStory do Scenario "the Given has parentheses" do
2008 Jan 16
1
session data and user stories
hello there, i have been trying my hand at this rbehave material, specifically in terms of integration testing a rails application, and i am curious about the most friendly way to deal with session data. currently, the only way i have found to simulate a session is to open a session and refer to everything afterward via the @session variable stored after open_session. it seems to be workable,
2007 Oct 05
2
Stories VS Scenarios
Hi all, I have read Dan North''s post ''Whats in a Story?'' (http://dannorth.net/whats-in-a-story) but I am still having a hard time knowing when I should break requirements up into separate stories or keep them as scenarios. I am currently trying to write a story (stories) for the registration process of a site. The registration process is a multistep process that
2006 Aug 04
1
route error with controllers in a module, should just work
This is ALL I have added to my routes.rb map.connect ''admin'', :controller => ''/admin/welcome'' I have found plenty of examples saying this is correct if you have a WelcomeController in the Admin module, which I do :) But now webrick won''t even start ??? Look at those 4 colons ::::, what is that about ? help ! => Booting WEBrick...
2008 May 22
2
Story / Redirection to static html within public
With a rails application I''m trying to access the public/ folder from within a rspec story. I have a controller which redirects to: /public/static_html_page.html I have a story written using webat. This story uses the above controller and it expects the redirection. This story always fails as within the story it cannot follow the redirection (Always gives a 500 error). It does not
2006 Sep 07
2
Matrix package in R-2.4.0alpha
In a newly downloaded version (today) of R-2-4-0alpha, with all packages from CRAN also installed today, I get: > library(Matrix) Erro en loadNamespace(package, c(which.lib.loc, lib.loc), keep.source = keep.source) : in 'Matrix' methods specified for export, but none defined: BIC, anova, coef, confint, deviance, fitted, fixef, formula, head, lmer, logLik, mcmcsamp, plot,
2004 Aug 06
4
integerization
Hi there. Just a little status update how that integerization is coming along. I am trying to limit myself to 32 bit arithmetics. That means not using any __int64 or long long datatypes at any point. I have now replaced all steps up to including the estimation of the LPC filter coefficients with integer code. That is about a quarter of the total work completed, I would say. One problem that i
2004 Oct 19
3
matrix of eigenvalues
I thought that the function eigen(A) will return a matrix with eigenvectors that are independent of each other (thus forming a base and the matrix being invertible). This seems not to be the case in the following example A=matrix(c(1,2,0,1),nrow=2,byrow=T) eigen(A) ->ev solve(ev$vectors) note that I try to get the upper triangular form with eigenvalues on the diagonal and (possibly) 1 just
2007 Sep 23
4
Story Runner, autoincrementing
I''ve written a story and I run into a snag. I''ve written the create_forum method and told it to set the id to 1 but when it creates the forum the id is autoincremented. My forums table is empty but the id keeps incrementing the newest record on creation. When I run the story it comes out as something like 59 which fails my story because I''m asking it to look at /forums/1
2006 Sep 07
6
Template "specialisation"
I want to use a sitewide default template and use a specific version in some controllers to have a good DRY approach to my layout. Those controllers should add a little bit more HTML before rendering the results of the actions, in order to avoid copying the entire sitelayout every time. How can I do that? Currently my code is like this: class WelcomeController < ApplicationController
2008 Mar 14
5
Branching scenarios, GivenScenario and database
I''m trying to use stories to drive some high-level design. I''ve got some branching scenarios where I want to follow a scenario, to establish a base situation, and then have different scenarios which ''branch'' out from that state, possibly several levels deep. I asked a bit about this a few days ago, and David pointed out the rather undocumented GivenScenario
2007 Sep 14
2
Mocks in StoryRunner
Hi, I''m trying to get up and running with StoryRunner. I have a story that looks something like the following, but the call to mock_model produces the exception listed below. Am I just misunderstanding the concept? Are mocks not meant to be used in stories like this? Or is this a bug? Changing @user to be an actual AR object makes things run without error. ENV["RAILS_ENV"] =
2006 Apr 07
1
[FYI] issues with integration testing
I was working on an integration test to test login/logout functionality and came across an issue that took me a bit to figure out. In one of my controllers, I have to test the request.env["HTTP_USER_AGENT"] value as a portion of the app will be access by Windows CE hand-helds. in the controllers index action i had the lines logger.info "user agent: " +