similar to: how to debug using rspec stories

Displaying 20 results from an estimated 7000 matches similar to: "how to debug using rspec stories"

2008 Oct 06
10
Uninitialized constant Spec:Story
Hi, I''m fairly new to Rails and v. new to RSpec. Think it looks pretty useful and so I''m trying it out for the first time. I have installed the rspec-rails gem and created a simple plain text my_story file and my_story.rb file along the lines described here - http://www.tomtenthij.co.uk/2008/1/25/rspec-plain-text-story-runner-on-a-fresh-rails-app. When I run
2008 May 30
4
RSpec Post/Get and Sessions in a Story
I''ve got an RSpec story that reads like: ------------------------------------------------------------------- Given that a post exists And I am logged in And I have edit permissions When I visit the post details page Then there should be a link to add a new comment ------------------------------------------------------------------- The issue I''m having is that I can''t
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
2007 Dec 30
6
Restful-Authentication Rspec Failure Rails 2.0.2
I am trying the Restful-Authentication (latest version, downloaded today) and upon running the generator, doing the migration, prepping the test system and putting the resources in routes.rb I get a Rspec test failure: ''SessionsController logins and redirects'' FAILED expected not nil, got nil routes.rb has: map.resources :users map.resources :sessions nothing else was
2008 Nov 04
18
Can I do foo.should (be_nil || be_empty) in rspec
Is there any way to do foo.should (be_nil || be_empty) in rspec. Thanks in advance -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20081104/ee43c9c9/attachment.html>
2011 Apr 19
1
RSpec/Webrat Checking output is properly escaped
I want to test that the JSON response from a create action is sanitized properly, but rspec or webrat appears to be parsing the output into proper HTML chars instead of escaped characters. I have verified that it escapes properly in the regular browser json response. The relevant RSpec test code is: include ActionView::Helpers::TextHelper include ActionView::Helpers::UrlHelper it
2008 Jan 21
5
attachment_fu and story runner, any updates
I''m trying to write a story for a Rails app which involves using the attachment_fu plugin to upload images. After blunting my pick on this for a while, google found me this: http://www.ruby-forum.com/topic/134743#600831 So it seems that there''s a hole in Rails integration testing and multipart form posting. David offered to incorporate a patch to story runner at the end of the
2008 Nov 04
9
RSpec and PostgreSQL not playing nicely together
Here is a very simple spec: -- require File.expand_path(File.dirname(__FILE__) + ''/../spec_helper'') describe Product, "The Product model" do describe "When a new blank product object gets created" do before(:each) do @product = Product.new end it "should not be valid" do @product.should_not be_valid
2008 Jan 21
3
Story runner "macros"
I''ve gotten quite a bit out of Pat Maddox''s screencast http://evang.eli.st/blog/2007/10/8/story-runner-top-to-bottom-screencast One thing I''m not sure of is the feature where he writes things like: When "I POST to", "/articles", :post => {:title => "Title", :body => "Body") do | path, params| post_via_redirect
2008 Jun 20
15
before_save model callback rspec testing
hi all, i''m learning rspec and i can''t figure out how to test if a callback is executed in a model. my model code is: class User < ActiveRecord::Base before_save :encrypt_password ... def encrypt(password) self.class.encrypt(password, salt) end thanks a lot, cs. -- Posted via http://www.ruby-forum.com/.
2008 Mar 01
5
rspec with continuations: very strange
I appear to have written code which travels backwards through time: http://www.vimeo.com/742590 This disturbs me immensely. If anyone can explain it, that would be cool. I think it''s an illusion brought about by how RSpec wraps the code it executes, and by the sheer weirdness of continuations. -- Giles Bowkett Blog: http://gilesbowkett.blogspot.com Portfolio:
2009 Feb 09
3
RSpec Testing ActiveRecord config dependency.
I have the following library code: def normal_time_now return DateTime.now.utc if default_timezone == :utc return DateTime.now end This is dependent upon a setting in config/environment.rb # Make Active Record use UTC-base instead of local time config.active_record.default_timezone = :utc I want to test that I get the expected results with the config set to utc and
2010 Jun 11
2
Problem using Ruby On Rails with rspec to write user stories
Hej out there, i''m a newbie on ror and im trying to install rspec on my computer. I installed rspec an rspec-rails via gem. when i''m running the file script/generate rspec it works. but i have no folder called stories.... how can i fix this problem? thanks... hope to get some help;) -- You received this message because you are subscribed to the Google Groups "Ruby on
2008 Jan 11
0
Peepcode RSpec User Stories
http://peepcode.com/products/rspec-user-stories Shane Mingins ELC Technologies (TM) 1921 State Street Santa Barbara, CA 93101 Phone: +64 4 568 6684 Mobile: +64 21 435 586 Email: smingins at elctech.com AIM: ShaneMingins Skype: shane.mingins (866) 863-7365 Tel - Santa Barbara Office (866) 893-1902 Fax - Santa Barbara Office +44 020 7504 1346 Tel - London Office +44 020 7504 1347 Fax -
2008 Jan 03
2
backgroundrb and rspec Stories
Hi, I would like to use backgroundrb inside a story, been trying to set this up for a while, but I think the only solution is to use fixture files and unit testing. The problem is that every time I call a new worker, the test database gets wiped out, and only has available the records in fixture files. Instead, it would be great if the test database maintains its state throughout the
2007 Dec 21
4
StoryRunner docs/guidance
Hi all, Are there any plans for better documentation for the new StoryRunner feature? I tried to use it today (with Rails), and had a hard time getting my head around whether I was doing it "right" and exactly what things are appropriate to test at that level (this might be exacerbated by the fact that I''ve never really used integration testing that much). A full example of
2011 Jul 14
1
RoutingError with RSpec Controller test on Scoped Route
So I have a route that looks like this: scope "4" do scope "public" do scope ":apikey" do resources :shops end end end And a bunch of controller specs, an example of which looks like this: describe ShopsController do describe "when responding to a GET" do context "#new" do it "should create a new instance
2007 Apr 04
11
ANN: RSpec 0.9.0 beta-1 available for download.
We''d like to get some feedback on RSpec 0.9 before we start pushing out releases via Rubyforge''s gem server and update the website. We have therefore made the first beta of 0.9 available - both prepackaged and tagged in subversion (see below). RSpec 0.9 introduces a new API for expectations, which essentially means that your underscores go away (there has been other discussions
2007 Jul 26
6
response.should_not redirect_to
Hey, May be it is just too deep night over here and I''m missing something though I got this failure on {{{response.should_not redirect_to}}}: ''QueuesController should allow authenticated user to access ''show'''' FAILED Matcher does not support should_not. See Spec::Matchers for more information about matchers. Also I''ve found this in
2007 Aug 10
1
How to spec a model method
Still new to Specs... How do I create a spec to test a model method? Specifically, here is my spec: #testing model describe User do it "should have many user roles" do User.reflect_on_association(:user_roles).should_not be_nil end it "should have many roles though user roles" do User.reflect_on_association(:roles).should_not be_nil end it "should know