Re: [rspec-users] rSpec, Selenium and screenshots

2008-04-08 Thread Andrew WC Brown
Apr 8, 2008 at 9:27 PM, David Chelimsky <[EMAIL PROTECTED]> > wrote: > > > On Tue, Apr 8, 2008 at 6:29 AM, Andrew WC Brown <[EMAIL PROTECTED]> > > wrote: > > > > > On Tue, Apr 8, 2008 at 6:25 AM, Bart Zonneveld <[EMAIL PROTECTED] > > > > > &g

Re: [rspec-users] rSpec, Selenium and screenshots

2008-04-08 Thread Andrew WC Brown
Doesn't Selenium already do that? Mine takes screenshots on failure. On Tue, Apr 8, 2008 at 6:25 AM, Bart Zonneveld <[EMAIL PROTECTED]> wrote: > Hey list, > > I'm currently playing with the selenium acceptance test-thingies, and > I want to build something that saves a screenshot when a test fail

Re: [rspec-users] Welcome Pat Maddox

2008-04-04 Thread Andrew WC Brown
Gooble Goble, Gooble Goble, One of Us! One of Us! On Fri, Apr 4, 2008 at 2:42 PM, Brian Takita <[EMAIL PROTECTED]> wrote: > On Fri, Apr 4, 2008 at 10:26 AM, aslak hellesoy > <[EMAIL PROTECTED]> wrote: > > On 4/4/08, Luis Lavena <[EMAIL PROTECTED]> wrote: > > > On Fri, Apr 4, 2008 at 11:35 AM, Pa

Re: [rspec-users] Win MoNeY Online

2008-03-22 Thread Andrew WC Brown
What would spec first? the views or controllers.Honestly I don't see any point since views are so britle. I guess you'd just check with reg exp for the changing name On Sat, Mar 22, 2008 at 3:09 PM, Corey Haines <[EMAIL PROTECTED]> wrote: > +1 > > > On Sat, Mar 22, 2008 at 2:49 PM, Ashley Moran <

Re: [rspec-users] Win MoNeY Online

2008-03-22 Thread Andrew WC Brown
Easy money was full working specs?How can I go wrong!!??!! On Sat, Mar 22, 2008 at 6:45 AM, Asdas Safasf <[EMAIL PROTECTED]> wrote: > Make money online:the first thing you have to do is to enter: > http://bux.to/?r=costel333 register then start making money by > clicking on surf ads and visit s

Re: [rspec-users] rspec with continuations: very strange

2008-03-01 Thread Andrew WC Brown
Wow, thats reminds of when micheal jay fox flew back in time and he almost broke his specs by going out with his mom."should_not be_nil" LawL Couldn't you On Sat, Mar 1, 2008 at 12:37 PM, Giles Bowkett <[EMAIL PROTECTED]> wrote: > I appear to have written code which travels backwards through t

Re: [rspec-users] bad specs better than none?

2008-02-27 Thread Andrew WC Brown
I replied before in this topic saying that I was doing manual testing.I should state that I am now using Selenium + Ruby + RSpec. ASP 0 - Ruby 1 On Thu, Feb 28, 2008 at 12:09 AM, Joseph Anthony Pasquale Holsten < [EMAIL PROTECTED]> wrote: > > On 02008:02:27, at 10:01CST, MaurĂ­cio Linhares wrote

Re: [rspec-users] bad specs better than none?

2008-02-25 Thread Andrew WC Brown
A better question would be do you have that authority to retrain them?That sounds awful to say the least. It could be worse, you could be the guy that is the test driven development library that manually goes in and see what breaks and what doesn't. When I refer to you "could be the guy", I'm acta

Re: [rspec-users] RSpec and script/console??

2008-02-19 Thread Andrew WC Brown
I don't know how or what the advantage would be to run it from console.I think the approach is just to run the specs file as normal. On Feb 19, 2008 12:35 PM, Andy Leak <[EMAIL PROTECTED]> wrote: > I am a rSpec newbie. When learning ruby and rails, I found the console > to be a really helpful t

Re: [rspec-users] Specs versus Stories

2008-02-18 Thread Andrew WC Brown
My workflow is the following: Stories->Spec Views->Spec Controllers-Spec Models I'll write a few stories of what I think should it happen. Then I'll write my specs of what should show (and also do some static html page mockups) Then I'll spec my controllers and models I'll go back to my stories to

Re: [rspec-users] Generated rspec video

2008-02-11 Thread Andrew WC Brown
If this is a a video mostly in a text editor like TextMate I'd recommend converting it to Apple Animation. On Feb 11, 2008 11:42 PM, Alex Satrapa <[EMAIL PROTECTED]> wrote: > On 12/02/2008, at 14:07 , [EMAIL PROTECTED] wrote: > > > A sneak preview of what I've been doing with my patch that made i

Re: [rspec-users] Generated rspec video

2008-02-11 Thread Andrew WC Brown
Load Failed Reason : Operation could not be completed. (WebKitErrorDomain error 204.) On Feb 11, 2008 10:07 PM, <[EMAIL PROTECTED]> wrote: > Hi all! > > A sneak preview of what I've been doing with my patch that made it > into rspec 1.1.3: > http://chmeee.dyndns.org/ruby/R-Spec%20Demo.avi > (2

Re: [rspec-users] BDD and TDD (was "Newbie question with rspec on rails")

2008-02-04 Thread Andrew WC Brown
David, I'll be your cha'Dich Some people still sware using TDD over BDD. On Feb 4, 2008 10:51 AM, David Chelimsky <[EMAIL PROTECTED]> wrote: > On Feb 4, 2008 1:20 AM, Pat Maddox <[EMAIL PROTECTED]> wrote: > > For some info on why BDD ki

Re: [rspec-users] OT local version control?

2008-02-03 Thread Andrew WC Brown
sourcesafe! I'm suggestively working on getting the company I'm at onto Subversion instead.I feel your pain On Feb 3, 2008 12:45 PM, Corey Haines <[EMAIL PROTECTED]> wrote: > I'll check that out, too, Luis. Thanks! > > I'm currently reading up on mercurial, and it is very enlightening. I'll > adm

Re: [rspec-users] loading fixtures?

2008-01-31 Thread Andrew WC Brown
loads the test fixtures, instead of the spec fixtures directory.Does it work for you? On Jan 31, 2008 7:03 PM, Corey Haines <[EMAIL PROTECTED]> wrote: > rake db:fixtures:load doesn't work? > > > On Jan 31, 2008 6:57 PM, Andrew WC Brown <[EMAIL PROTECTED]> w

Re: [rspec-users] loading fixtures?

2008-01-31 Thread Andrew WC Brown
no, just database On Jan 31, 2008 6:56 PM, Corey Haines <[EMAIL PROTECTED]> wrote: > Do you want to load them in your controller? You can put > > class MyController > fixtures :fixturename > > end > > > -Corey > > On Jan 31, 2008 5:52 PM, Andrew WC Brown

[rspec-users] loading fixtures?

2008-01-31 Thread Andrew WC Brown
How do you load fixtures from specs as you would test? eg. rake db:fixtures:load RAILS_ENV=development ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] catching errors, rspec basics

2008-01-29 Thread Andrew WC Brown
lawl, David has been out of the loop a few e-mails.I left in an extra line. Thanks for the expansion Ben, adds much more clarity, On Jan 29, 2008 8:03 PM, David Chelimsky <[EMAIL PROTECTED]> wrote: > On Jan 29, 2008 6:55 PM, Andrew WC Brown <[EMAIL PROTECTED]> wrote: > >

Re: [rspec-users] catching errors, rspec basics

2008-01-29 Thread Andrew WC Brown
CTED]> wrote: > Andrew WC Brown wrote: > > oh, I left in: > > > > it "should return an error when passed a string" do > > @audience.stats = 'Market Goblin' > > lambda [EMAIL PROTECTED] = 'Market Goblin'}.should raise_

Re: [rspec-users] catching errors, rspec basics

2008-01-29 Thread Andrew WC Brown
; do > @audience.stats = 10 > @audience.stats.should == 8000 > end > > it "should return an error when passed a string" do > lambda [EMAIL PROTECTED] = 'Market Goblin'}.should raise_error > end > > end > On 30/01/20

Re: [rspec-users] catching errors, rspec basics

2008-01-29 Thread Andrew WC Brown
try it, does the same thing ='( On Jan 29, 2008 7:49 PM, Shane Mingins <[EMAIL PROTECTED]> wrote: > Are you looking for something like this > lambda { @audience.stats = 'Market Goblin' }.should raise_error > > > On 30/01/2008, at 1:48 PM, Andrew WC Brown wro

[rspec-users] catching errors, rspec basics

2008-01-29 Thread Andrew WC Brown
Trying to spec the following but don't know if I'm using the right matcher. How do I spec? Plz, sugar on tops. Audience.stats - should have a stats of 80 when passed a flux of 10 - should return an error when passed a string (ERROR - 1) 1) TypeError in 'Audience.stats should return an error when

Re: [rspec-users] Could this controller test be made simpler?

2008-01-28 Thread Andrew WC Brown
Been a month since I've rspec, I think you can place the stubs here. @user = mock_model(User, login => "", email => "", password => "", password_confirmation => "" ) @account = mock_model(Account, subdomain => "", company_name => "", filename => "" ) On Jan 28, 2008 2:36 PM, Chris Olsen <[EMAIL

Re: [rspec-users] DRYing up stories

2008-01-23 Thread Andrew WC Brown
Do all of these scenarios exist in the same story? Should they be dried up? Would Clarity over Cleverness apply here? On Jan 23, 2008 4:45 PM, Neil M. Young <[EMAIL PROTECTED]> wrote: > > I'm finding that I'm writing sets of very similar scenarios to check > access > permissions for each of my ac

Re: [rspec-users] Okay, I'm finally asking for help

2008-01-14 Thread Andrew WC Brown
Did your spec failed? Would you paste it? On Jan 14, 2008 9:32 PM, David Chelimsky <[EMAIL PROTECTED]> wrote: > On Jan 14, 2008 8:31 PM, Corey Haines <[EMAIL PROTECTED]> wrote: > > Hi, all! > > > > I would love if someone could help me figure this out. I can't seem to > see > > why the following

Re: [rspec-users] Do you think it would look cleaner?

2007-12-29 Thread Andrew WC Brown
e these large blocks of: @shopping_list.should_receive(:milk)..and_return('milk') @shopping_list.should_receive(:bagel).and_return('bagel') @shopping_list.should_receive(:coffee).and_return('coffee') and it would be much clearer if I could list them in a hash instead. On Dec 29, 2007 1:29 PM, P

[rspec-users] Do you think it would look cleaner?

2007-12-29 Thread Andrew WC Brown
I was looking over some of my specs. I was thinking that the following: @game.should_receive(:name).and_return('The Battle for Blaze') @game.should_receive(:people).and_return(500) @game.should_receive(:activated).and_return(true) Would it look cleaner if I could do this instead? @game.shoul

Re: [rspec-users] StoryRunner docs/guidance

2007-12-22 Thread Andrew WC Brown
I never really thought of placing subdirectories in the stories directory. I guess that would be useful for separating your administrative stories for the back end of your app. I named my stories in the following convention: #role#_#action#_story.rb eg: user_creates_project_story.rb user_edits_p

Re: [rspec-users] RSpec book

2007-12-16 Thread Andrew WC Brown
I want to see a TOC. On Dec 14, 2007 6:42 AM, David Chelimsky <[EMAIL PROTECTED]> wrote: > On Dec 14, 2007 2:35 AM, Tom Stuart <[EMAIL PROTECTED]> wrote: > > On 14 Dec 2007, at 06:36, Chris Olsen wrote: > > > BTW. Has anyone heard if the pragmatic rspec book is still planned to > > > be released

Re: [rspec-users] What to test for views?

2007-12-09 Thread Andrew WC Brown
I think what David said before about spec views is take it with a grain of salt. If you think you need to check the presence of every field go ahead. When I spec out my views I only spec what needs to be there: I won't check for the presence of a form fields new.rhtml_spec.rb I would place my fie

Re: [rspec-users] help anyone?

2007-11-18 Thread Andrew WC Brown
If you want help moving them over give me a shout. On Nov 18, 2007 5:34 PM, David Chelimsky <[EMAIL PROTECTED]> wrote: > On Nov 18, 2007 3:16 PM, David Chelimsky <[EMAIL PROTECTED]> wrote: > > Hi everybody. > > > > Per http://rubyforge.org/pipermail/rspec-users/2007-November/004572.html > , > > w

Re: [rspec-users] Story Runner: Readability of output with multiple params

2007-10-13 Thread Andrew WC Brown
When I first used story runner I thought the same option would be needed. Then I thought about it then came to the conclusion that it would be more clear to write something such as: Given a user named, Joe And a company named, Acme And user works for, Acme And user is a, Janitor On 10/14/07, Andy

Re: [rspec-users] locals in partials

2007-10-12 Thread Andrew WC Brown
___ > rspec-users mailing list > rspec-users@rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users > -- Monsterbox Productions putting small businesses on-line 1319 Victoria Avenue East Thunder Bay, Ontario P7C 1C3 Canad

Re: [rspec-users] Easy AR association stubbing

2007-10-08 Thread Andrew WC Brown
ntrollers/players_controller_spec.rb:103: /Volumes/EXTERNAL/web/omenking.ca/spec/controllers/players_controller_spec.rb:63: Any suggestions? On 10/6/07, Pat Maddox <[EMAIL PROTECTED]> wrote: > > On 10/6/07, Andrew WC Brown <[EMAIL PROTECTED]> wrote: > > But what if I n

Re: [rspec-users] spec'in controllers request for nested routes

2007-10-08 Thread Andrew WC Brown
Oh Game.stub!(:find).and_return(@game) Of Course! ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] spec'in controllers request for nested routes

2007-10-08 Thread Andrew WC Brown
, David Chelimsky <[EMAIL PROTECTED]> wrote: > > On 10/8/07, Andrew WC Brown <[EMAIL PROTECTED]> wrote: > > describe PlayersController, "handling GET /saltmines/games/1/players" do > > > > before do > > @game = mock_model(Game, :to_param

[rspec-users] spec'in controllers request for nested routes

2007-10-08 Thread Andrew WC Brown
describe PlayersController, "handling GET /saltmines/games/1/players" do before do @game = mock_model(Game, :to_param => "1") @game.stub_association!(:players, :find => mock_model(Player)) end def do_get get :index, :game_id => @game end it "should be successful" do do_

Re: [rspec-users] Easy AR association stubbing

2007-10-06 Thread Andrew WC Brown
But what if I need to use posts as such? @person = mock_model(Person) @person.stub_association!(:posts, :find_by_title => mock_model(Post)) posts.stub!(:count).and_return(2) ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mai

Re: [rspec-users] spec'ing views, mock_model associations

2007-10-06 Thread Andrew WC Brown
ld).and_return(mock_model(Player, :save => true)) @game.stub!(:players).and_return(players) players.stub!(:count).and_return(2) On 10/6/07, Andrew WC Brown <[EMAIL PROTECTED]> wrote: > > Oh so I have to mock post_proxy. > I think I'm getting closer > > @game

Re: [rspec-users] spec'ing views, mock_model associations

2007-10-06 Thread Andrew WC Brown
4 of app/views/games/_game.rhtml 1: 2: 3: <%= link_to game.name, new_player_path(game) %> 4: <%= link_to "(#{game.players.count}) Players", "google.com" %> 5: Salt unmined:<%= h game.salt_grains %> 6: <%= h game.people %> 7: <%= h gam

Re: [rspec-users] spec'ing views, mock_model associations

2007-10-06 Thread Andrew WC Brown
quot;, "google.com" %> 5: Salt unmined:<%= h game.salt_grains %> 6: <%= h game.people %> 7: <%= h game.enabled %> On 10/6/07, Andrew WC Brown <[EMAIL PROTECTED]> wrote: > > I writing a spec that returns the count of how many players in a game:

[rspec-users] spec'ing views, mock_model associations

2007-10-06 Thread Andrew WC Brown
I writing a spec that returns the count of how many players in a game: it "should how many players in a link to all players" do render :partial =>"games/game", :object => @game response.should have_tag('a',"(2) Players") end I'm not sure how to do the mock model, I think it would be done two wa

Re: [rspec-users] spec'ing view render partial collection, local variable not found

2007-10-06 Thread Andrew WC Brown
have ever spec'd view if I hadn't started using story runner. I love that story runner. On 10/5/07, David Chelimsky <[EMAIL PROTECTED]> wrote: > > I meant the view code as well. > > On 10/5/07, Andrew WC Brown <[EMAIL PROTECTED]> wrote: > > As soon as I add

Re: [rspec-users] have_xml_tag

2007-10-05 Thread Andrew WC Brown
rubyforge.org/mailman/listinfo/rspec-users > -- Monsterbox Productions putting small businesses on-line 1319 Victoria Avenue East Thunder Bay, Ontario P7C 1C3 Canada Andrew WC Brown web-developer and owner [EMAIL PROTECTED] P: 807-626-9009 F: 807-624-2705 __

Re: [rspec-users] Specs and Libs

2007-10-05 Thread Andrew WC Brown
AuthenticatedSystem library has tests already written for it. Just as Jim said you needn't write specs for it. But if you did want to write spec's for the AuthenticatedSystem then you'd create a directory inside the plugin directory with all the other directory and files pointing the paths to the

Re: [rspec-users] Easy AR association stubbing

2007-10-05 Thread Andrew WC Brown
Thanks I'll give it a try and praise you later. ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] spec'ing view render partial collection, local variable not found

2007-10-05 Thread Andrew WC Brown
before do game = mock_model(Game, :name => 'The Battle for Blaze', :enabled => 'true') puts game.name puts game.enabled game.should_receive(:name).and_return('The Battle for Blaze') game.should_receive(:enabled).and_return('true') @game = game end I still got the error but I saw in th

Re: [rspec-users] spec'ing view render partial collection, local variable not found

2007-10-05 Thread Andrew WC Brown
rks fine. ?!??! I have other mock models setup that don't give me that trouble. On 10/5/07, Andrew WC Brown <[EMAIL PROTECTED]> wrote: > > _game.rhtml_spec > > require File.dirname(__FILE__) + '/../../spec_helper' > > describe "/games/_game.rhtml&qu

Re: [rspec-users] spec'ing view render partial collection, local variable not found

2007-10-05 Thread Andrew WC Brown
uot;games/game", :locals => {:game => @game} response.should have_text(/The Battle for Blaze/) end end When you say full listing did you mean html format? I cut out most of my specs just to spec the partial. I only have the one spec in my partial On 10/5/07, David Chelimsky <[E

Re: [rspec-users] spec'ing view render partial collection, local variable not found

2007-10-05 Thread Andrew WC Brown
onError in '/games/_game.rhtml should show game name' Mock 'Game_1082' expected :salt_grains with (any args) once, but received it 0 times ./spec/views/games/_game.rhtml_spec.rb:15: On 10/5/07, David Chelimsky <[EMAIL PROTECTED]> wrote: > > On 10/5/07, Andrew WC Brown <[E

Re: [rspec-users] spec'ing view render partial collection, local variable not found

2007-10-05 Thread Andrew WC Brown
;/games/_game.rhtml should show game name' You have a nil object when you didn't expect it! The error occurred while evaluating nil.name On line #1 of app/views/games/_game.rhtml 1: <%= h game.name %> so the local variable is show up nil. On 10/5/07, David Chelimsky <[EMAI

Re: [rspec-users] spec'ing view render partial collection, local variable not found

2007-10-05 Thread Andrew WC Brown
.rhtml were failing when they were fine before and they were saying they didn't know what this game variable was. Any ideas? On 10/5/07, David Chelimsky <[EMAIL PROTECTED]> wrote: > > On 10/5/07, Andrew WC Brown <[EMAIL PROTECTED]> wrote: > > I'm trying

[rspec-users] spec'ing view render partial collection, local variable not found

2007-10-05 Thread Andrew WC Brown
I'm trying to spec out a render partial collection but I get the following error 2) NoMethodError in '/games/_game.rhtml should show game name' undefined method `body' for #<#:0x2f1154c> /Volumes/EXTERNAL/web/omenking.ca/vendor/plugins/rspec_on_rails/lib/spec/rails/matchers/have_text.rb:12:in `mat

Re: [rspec-users] how to spec views

2007-10-01 Thread Andrew WC Brown
I think I asked to quickly. I'm guessing its template.expect_render(:partial => 'games', :collection => @games) On 10/1/07, Andrew WC Brown <[EMAIL PROTECTED]> wrote: > > How about specing partial collections? > > it "should render a list of games fo

Re: [rspec-users] flash in story runner

2007-10-01 Thread Andrew WC Brown
I just used the response text On 10/1/07, Jonathan Linowes <[EMAIL PROTECTED]> wrote: > > hi, > > is there a way to assert a flash message directly in story runner? Or > do I have to go through the response text instead. > > Then "flash message should say success" do >#flash[:

Re: [rspec-users] how to spec views

2007-10-01 Thread Andrew WC Brown
I just use have_text and look for the img and signup_propaganda.gif? On 10/1/07, Andrew WC Brown <[EMAIL PROTECTED]> wrote: > > I solved it. > > The two problems were that I named my paths wrong and I was calling > template instead of repsonse > > it "should have a cre

Re: [rspec-users] how to spec views

2007-10-01 Thread Andrew WC Brown
mes/index.rhtml" response.should have_tag('a','Create new game') end I'm stlll getting used to the whole spec'ing view things. Its good to know my only problem is minor typo's I love RSPEC On 10/1/07, Andrew WC Brown <[EMAIL PROTECTED]> wrote: > > Wel

Re: [rspec-users] how to spec views

2007-10-01 Thread Andrew WC Brown
Well I figured out why it didn't understand what the route was. it was new_games_path when it should have been new_game_path. Still not sure about the anchor tag On 10/1/07, Andrew WC Brown <[EMAIL PROTECTED]> wrote: > > I had reinstalled the plugin yesterday but I reins

Re: [rspec-users] how to spec views

2007-10-01 Thread Andrew WC Brown
I had reinstalled the plugin yesterday but I reinstalled it and its revision 2680 It still gives me the error. On 10/1/07, David Chelimsky <[EMAIL PROTECTED]> wrote: > > On 10/1/07, Andrew WC Brown <[EMAIL PROTECTED]> wrote: > > 1.0.9 > > That's not been re

Re: [rspec-users] how to spec views

2007-10-01 Thread Andrew WC Brown
1.0.9 On 10/1/07, David Chelimsky <[EMAIL PROTECTED]> wrote: > > On 10/1/07, Andrew WC Brown <[EMAIL PROTECTED]> wrote: > > How about spec'ing links? > > > > <%= link_to 'Create new game', new_games_path %> > > > > i

Re: [rspec-users] how to spec views

2007-10-01 Thread Andrew WC Brown
a link_to generates an anchor tag shouldn't of my spec have passed? On 10/1/07, David Chelimsky <[EMAIL PROTECTED]> wrote: > > On 10/1/07, Andrew WC Brown <[EMAIL PROTECTED]> wrote: > > It didn't know what controller was, should it not know it what it is by > > def

Re: [rspec-users] how to spec views

2007-10-01 Thread Andrew WC Brown
It didn't know what controller was, should it not know it what it is by default or do I have to assign a controller at the top of my spec? On 10/1/07, Andrew WC Brown <[EMAIL PROTECTED]> wrote: > > The was really helpful, thanks David! > > "There is no simple answer

Re: [rspec-users] how to spec views

2007-10-01 Thread Andrew WC Brown
wrote: > > On 10/1/07, Andrew WC Brown <[EMAIL PROTECTED]> wrote: > > I'm trying to spec a view but haven't done much view specing. > > > > This view render different partials depending on authentication of the > user: > > annon, admin, player > > So

[rspec-users] how to spec views

2007-09-30 Thread Andrew WC Brown
I'm trying to spec a view but haven't done much view specing. This view render different partials depending on authentication of the user: annon, admin, player So I I'll write if conditionals in the view with the partials it "should render signup propaganda for annon users trying to view games

Re: [rspec-users] autotest stop working, 1.0.9?

2007-09-30 Thread Andrew WC Brown
I reinstalled the plugins and generated rspec but still doesn't work. On 9/30/07, Scott Taylor <[EMAIL PROTECTED]> wrote: > > > On Sep 30, 2007, at 3:05 AM, Andrew WC Brown wrote: > > > My autotest runs but when I make changes to a spec it doesn't reload. >

[rspec-users] autotest stop working, 1.0.9?

2007-09-30 Thread Andrew WC Brown
My autotest runs but when I make changes to a spec it doesn't reload. I checked another application I was building that had 1.0.9 but it was reloading fine. How would I debug a problem such as autotest not reloading? ___ rspec-users mailing list rspec-us

[rspec-users] mock_model named spaces not working

2007-09-28 Thread Andrew WC Brown
I have a namespace called saltmines The following will fail the spec @player = mock_model(Saltmines::Player) 1) ActionView::TemplateError in '/saltmines/players/index.rhtml should render list of saltmines/players' You have a nil object when you didn't expect it! You might have expected an instan

[rspec-users] [Story] passing a file using post

2007-09-26 Thread Andrew WC Brown
I'm trying to run a story for sample caboose that I created. I haven't changed any of the sample application code. When I try to do the following: When "creating a new asset named", File.open('/Users/multimedia/desktop/sample/assets/bridge.jpg') do |path| post_via_redirect "/users/[EMAIL PROTEC

Re: [rspec-users] simple story, extract link

2007-09-25 Thread Andrew WC Brown
Oh that was my post a few days ago. I was trying to emulate the following: Jon is logging onto the forum so he can create a new topic. When Jon logs on he is redirected the home page by default. Jon then clicks on the general forum so he go create a topic. This following seemed out of place. I th

Re: [rspec-users] simple story, extract link

2007-09-25 Thread Andrew WC Brown
Hi Jon, I've been having alot of fun with Story Runner this week. I'm trying to find the time this week to do a screencast on story runner. Here's an example of how I might write your story. http://pastie.caboo.se/100835 I didn't use in my example how you'd like to check for the url. I'm unsure

Re: [rspec-users] Story Runner, autoincrementing

2007-09-23 Thread Andrew WC Brown
Then "user should see", "topics/new" do |template| response.should render_template(template) end And "page should show", "Error" do |title| response.should have_text(/#{title}/) end end Is there a better way to test for errors

Re: [rspec-users] Story Runner, autoincrementing

2007-09-23 Thread Andrew WC Brown
e test will fail. Now should this be in my story because I'm not testing the if login works. Anyway to share it with all my stories or should I move this line into my create_user function? On 9/23/07, Pat Maddox <[EMAIL PROTECTED]> wrote: > > On 9/22/07, Andrew WC Brown <[EMAIL

[rspec-users] Story Runner, autoincrementing

2007-09-22 Thread Andrew WC Brown
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 somethi

Re: [rspec-users] Testing RESTful routes

2007-09-22 Thread Andrew WC Brown
I'm currently in a simliar situation as you. I have an application that doesn't use the default routing. When I try to write my stories. ex. And "user logged in successfully" do post "/session/create", :login => "Jon", :password => "your_momma" response.should redirect_to(home_path) end The

Re: [rspec-users] Getting Started with Story Runner

2007-09-21 Thread Andrew WC Brown
ctive_support/dependencies.rb:266:in `load_missing_constant' When a failure occurs in a story does it always print out a heapstack or is my code incorrect? On 9/21/07, Evan David Light <[EMAIL PROTECTED]> wrote: > > There are also a couple of examples buried in the trunk

Re: [rspec-users] Getting Started with Story Runner

2007-09-20 Thread Andrew WC Brown
net > http://dotherightthing.com > http://www.railsecommerce.com > http://odesign.fi > > > ___ > rspec-users mailing list > rspec-users@rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users > -- Monsterbox Production

Re: [rspec-users] Getting Started with Story Runner

2007-09-20 Thread Andrew WC Brown
I'm guessing their isn't a generator for stories yet? ./script/generate story add_person On 9/20/07, James Hughes <[EMAIL PROTECTED]> wrote: > > On 9/20/07, Ben Mabey <[EMAIL PROTECTED]> wrote: > > Andrew WC Brown wrote: > > > I haven't found any H

[rspec-users] Getting Started with Story Runner

2007-09-20 Thread Andrew WC Brown
I haven't found any How To's to use story runner and I'm not sure how to get started. Should I be looking for resources on how to use rbehave? How do I generate my first Story? ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/ma

[rspec-users] how do I get the beautiful html rspec results in textmate?

2007-09-16 Thread Andrew WC Brown
I'm going through PeepCode RSpec Basics and he gets a beautiful rspec results page in html when he presses a hotkey in TextMate. I would guess it's along the lines of Apple + R but I don't get the same results and I'm using the same bundle. ___ rspec-user

Re: [rspec-users] "Not Implemented" doesn't show

2007-09-16 Thread Andrew WC Brown
Both Solved, User Error =P On 9/16/07, Andrew WC Brown <[EMAIL PROTECTED]> wrote: > > Oh, he removed the block. > > describe PeepCode do > it "should be awsome" do > end > end > > describe PeepCode do > it "should be awsome" > end

Re: [rspec-users] "Not Implemented" doesn't show

2007-09-16 Thread Andrew WC Brown
Oh, he removed the block. describe PeepCode do it "should be awsome" do end end describe PeepCode do it "should be awsome" end I'm still haven't solved --format with specing. On 9/16/07, David Chelimsky <[EMAIL PROTECTED]> wrote: > > On 9/16/07,

[rspec-users] "Not Implemented" doesn't show

2007-09-16 Thread Andrew WC Brown
I'm going through Peepcode's Rspec Basics for an overview. He's just doing a simple spec: class PeepCode end describe PeepCode do it "should be awsome" do end end So running spec spec/simple_spec.rb should produce according to his screen cast: 1 example, 0 failures, 1 not implemented but I

Re: [rspec-users] I lost the RSpec fight

2007-09-16 Thread Andrew WC Brown
You may have lost the fight, but you didn't lose the war. On 9/16/07, Andrew WC Brown <[EMAIL PROTECTED]> wrote: > > I honestly didn't understand what I was testing for when I was using TDD. > I can't imagine starting a project without using rspec. > Rspec reads m

Re: [rspec-users] I lost the RSpec fight

2007-09-16 Thread Andrew WC Brown
I honestly didn't understand what I was testing for when I was using TDD. I can't imagine starting a project without using rspec. Rspec reads much clearly and keeps me in scope. The same reason I can't imagine starting a project without ruby. Freedom is Slavery! On 9/16/07, David James <[EMAIL PR

Re: [rspec-users] Invite from Ben Askins ([EMAIL PROTECTED])

2007-09-03 Thread Andrew WC Brown
What about Caboose Facebook? http://faces.caboo.se On 9/4/07, Ben Mabey <[EMAIL PROTECTED]> wrote: > > Hmm... maybe it was somehow speced out in rspec at least ;) > > Andrew WC Brown wrote: > > but its not even built with Rails. > > > > On 9/3/07, *Ben As

Re: [rspec-users] Invite from Ben Askins ([EMAIL PROTECTED])

2007-09-03 Thread Andrew WC Brown
eceive any more emails from > Quechup<http://quechup.com/emailunsubscribe.php/ZW09cnNwZWMtdXNlcnNAcnVieWZvcmdlLm9yZw%3D%3D> > > ___ > rspec-users mailing list > rspec-users@rubyforge.org > http://rubyforge.org/mailman/listinfo/rsp

Re: [rspec-users] Deprecating the mocking framework?

2007-09-02 Thread Andrew WC Brown
ouldn't be using it, but, that we (David, Aslak, Brian, > etc) won't have to maintain it. Or am I missing something? > > Scott > > > > ___ > rspec-users mailing list > rspec-users@rubyforge.org > http://rubyforge.org/mailman/listinfo

Re: [rspec-users] Deprecating the mocking framework?

2007-09-01 Thread Andrew WC Brown
After a quick google search: http://www.slideshare.net/viget/mockfight-flexmock-vs-mocha I have no problem using a external mocking framework but its the choosing. convention over configuration. On 9/1/07, rupert <[EMAIL PROTECTED]> wrote: > > > On 1 Sep 2007, at 18:16, Andrew

Re: [rspec-users] Deprecating the mocking framework?

2007-09-01 Thread Andrew WC Brown
My question is what would you recommend for Mocking? Mocha or FlexMock? On 9/1/07, rupert <[EMAIL PROTECTED]> wrote: > > > On 1 Sep 2007, at 10:04, Tom Stuart wrote: > > > On 1 Sep 2007, at 09:31, rupert wrote: > >>> Are we planning on dumping the mock framework in favor of using > >>> Mocha > >

[rspec-users] using restful_authentication current_user inside controller specs

2007-08-20 Thread Andrew WC Brown
I'm using restful_authentication in my app and I have the before filters in my application rhtml: before_filter :login_required around_filter :set_timezone around_filter :catch_errors Currently I have them commented out while rspec'in but I'll need to add them in my specs. def create @ti

Re: [rspec-users] [rspec] looking for a simple refresher

2007-08-20 Thread Andrew WC Brown
u wouldn't have to clean up this mess" On 8/20/07, Andrew WC Brown <[EMAIL PROTECTED]> wrote: > > Still having trouble ='( > > > def create > @user = User.find(params[:user_id]) > @ticket = @user.tickets.build(params[:ticket]) > if @

Re: [rspec-users] [rspec] looking for a simple refresher

2007-08-20 Thread Andrew WC Brown
Still having trouble ='( def create @user = User.find(params[:user_id]) @ticket = @user.tickets.build(params[:ticket]) if @ticket.save redirect_to tickets_path else render new_usr_ticket_path(params[:user_id]) end end describe TicketsController, "handling POST

Re: [rspec-users] [rspec] looking for a simple refresher

2007-08-17 Thread Andrew WC Brown
to the ticket path if successful" do > do_post > response.should redirect_to('/tickets') > end > > it "should render the new page if create fails" do > @ticket.stub!(:save).and_return(false) > do_post > response.should render

Re: [rspec-users] [rspec] looking for a simple refresher

2007-08-17 Thread Andrew WC Brown
gt; > it "should create a new ticket" do > ticket.should_receive(:new).with(@params).and_return(@ticket) > do_post > end > > it "should assign the ticket for the view" do > do_post > assigns[:ticket].should equal(@ticket) > end &

Re: [rspec-users] [rspec] looking for a simple refresher

2007-08-17 Thread Andrew WC Brown
msky <[EMAIL PROTECTED]> wrote: > > On 8/17/07, Andrew WC Brown <[EMAIL PROTECTED]> wrote: > > I've been off the rspec for a few months and I'm trying to get back on > it. > > > > 1) > > Spec::Mocks::MockExpectationError in 'TicketsControll

[rspec-users] [rspec] looking for a simple refresher

2007-08-17 Thread Andrew WC Brown
I've been off the rspec for a few months and I'm trying to get back on it. 1) Spec::Mocks::MockExpectationError in 'TicketsController handling POST /tickets should create a new ticket' Mock 'Ticket_1001' expected :new with ({}) once, but received it 0 times ./spec/controllers/tickets_controller_sp