Re: [rspec-users] Fwd: spec_server not working...

2008-11-05 Thread Glenn Ford
This is the same error that I get also. I'd love to get this working, Glenn On Oct 31, 2008, at 5:04 PM, Nick Hoffman wrote: On 2008-10-31, at 17:52, Matt Darby wrote: Same thing unfortunately. It also happens when I add --drb to spec/ spec.opts and run autotest/autospec as well. G'day Mat

Re: [rspec-users] Plain Text Story example

2007-11-08 Thread Glenn Ford
It seems that what I'm coming to understand of the direction of this story concept is that there is a lot of emphasis being put on ensuring we keep things at the business level. I can appreciate the elegance of it certainly, but when I think of what I would really want to gain from this st

Re: [rspec-users] Plain Text Story example

2007-11-12 Thread Glenn Ford
That was exactly what I needed, thanks a lot! Glenn On Nov 9, 2007, at 10:59 AM, Dan North wrote: Hi Glenn. On Nov 8, 2007 4:01 PM, Glenn Ford <[EMAIL PROTECTED]> wrote: It seems that what I'm coming to understand of the direction of this story concept is that there is a lot

[rspec-users] Interdependency between RSpec files

2007-11-14 Thread Glenn Ford
I run my suite of tests, one test fails. I run that one test file, no tests fail. Something is carrying over between files and I can't figure out what. I tracked down the problem to the very line it's occurring on, with printouts before and after every call to make sure I know exactly what

Re: [rspec-users] Interdependency between RSpec files

2007-11-14 Thread Glenn Ford
ethod :original_method, :old_method end Unfortunately I didn't set the alias back at the end of the spec. That was my problem. Thanks a ton! Glenn On Nov 14, 2007, at 12:28 PM, Scott Taylor wrote: > > On Nov 14, 2007, at 11:37 AM, Glenn Ford wrote: > >> I run my suite of tests,

Re: [rspec-users] Interdependency between RSpec files

2007-11-15 Thread Glenn Ford
On Nov 14, 2007, at 2:14 PM, David Chelimsky wrote: > On Nov 14, 2007 1:07 PM, Glenn Ford <[EMAIL PROTECTED]> wrote: >> Your suggestion put me on the right track. I looked back to where I >> had I ran into a case where I was trying to stub an instance I >> couldn

[rspec-users] Trouble using should_receive

2007-11-15 Thread Glenn Ford
I have this code trying to ensure my reset method works. I want to make sure all the participants have their destroy method called. # in my spec for Room r = Room.new(:name => 'bob') r.save p = Participant.new(:login => 'a', :password => 'b', :password_confirmation => 'b')

Re: [rspec-users] Trouble using should_receive

2007-11-15 Thread Glenn Ford
On Nov 15, 2007, at 2:03 PM, Pat Maddox wrote: > On Nov 15, 2007 10:50 AM, Glenn Ford <[EMAIL PROTECTED]> wrote: >> >> I have this code trying to ensure my reset method works. I want to >> make sure >> all the participants have their destroy method call

Re: [rspec-users] helper methods starting with should

2007-11-18 Thread Glenn Ford
-1 I, as a new rspec user, did not find the switch between test_ and it "blah" do to be even a small challenge compared to other things I had to convert and learn. I only feel like it would be one more thing to keep up with that would cause problems. I can certainly see someone writing a

[rspec-users] Cookie Session Store Not Working in Safari

2008-01-02 Thread Glenn Ford
Here's the steps I followed: Generated the test code rails test mate test cd test script/generate scaffold thing rake db:create script/server Modified things_controller.rb index and new: def index end def new session[:user] = 5 redirect_to(things_path) end Set index.html.erb to

Re: [rspec-users] Cookie Session Store Not Working in Safari

2008-01-02 Thread Glenn Ford
rry, I'm new here, but isn't this totally irrelevant to RSpec in > every way? > > On 1/2/08, Glenn Ford <[EMAIL PROTECTED]> wrote: >> >> Here's the steps I followed: >> >> Generated the test code >> rails test >> mate tes

Re: [rspec-users] Cookie Session Store Not Working in Safari

2008-01-03 Thread Glenn Ford
I figured it out. My host, or rather my /etc/hosts mapped localhost url, had an underscore in it. That was causing the problem. I never new that was bad. Crazy! On Jan 3, 2008, at 12:54 AM, Giles Bowkett wrote: Whoops, you're very right, this isn't the RoR list! Oh well it's the only o

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

2008-02-28 Thread Glenn Ford
I have a similar perspective from my own personal experience. I am still quite the novice, but I'm as much of a novice in RSpec as I am in Ruby / RoR. Honestly, a lot of my specs in new sections end up having great coverage, but are full of real models and few of the "purist" BDD practice

Re: [rspec-users] "Why not MockEverthing" or why use fixtures for all tests?

2008-03-19 Thread Glenn Ford
I'd change a variable assignment with a .save to a .update_attribute and then I had a broken spec. My fear is that I'll write green specs, pat myself on the back, and then my company loses money because the site has bugs that my specs show green for because I don't have enough integration tests or whatever. But I don't want to have to double my tests for the same amount of coverage. I should have 1 spec for 1 feature and when that feature is working, that spec is green, plain and simple. I admit I may be ignorant to a lot of the power behind RSpec, but I like this level of simplicity and straightforwardness. Glenn Ford http://www.glennfu.com ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] "Why not MockEverthing" or why use fixtures for all tests?

2008-03-19 Thread Glenn Ford
On Mar 19, 2008, at 1:03 PM, David Chelimsky wrote: > On Wed, Mar 19, 2008 at 10:42 AM, Glenn Ford <[EMAIL PROTECTED]> > wrote: >>>> [Big Snip] >> >> >>> >>> There are a few bad assumptions in your colleague's response, so to >>&

Re: [rspec-users] "Why not MockEverthing" or why use fixtures for all tests?

2008-03-19 Thread Glenn Ford
On Mar 19, 2008, at 3:21 PM, David Chelimsky wrote: > On Wed, Mar 19, 2008 at 2:10 PM, Glenn Ford <[EMAIL PROTECTED]> wrote: >> >> On Mar 19, 2008, at 1:03 PM, David Chelimsky wrote: >>> Again - this is a matter of granularity. The whole point of having >>>

[rspec-users] Trouble with my first Story

2008-03-26 Thread Glenn Ford
Hi all! I've been through the RSpec Stories PeepCode and some various other readings online, and now I'm trying to build a dummy application of the traditional style: log in, make posts, add comments. So I've run the scaffold for posts/comments and the script for RestfulAuthentication so I

Re: [rspec-users] Trouble with my first Story

2008-03-26 Thread Glenn Ford
On Mar 26, 2008, at 6:28 PM, Chuck Remes wrote: > > On Mar 26, 2008, at 4:02 PM, Glenn Ford wrote: >> Hi all! I've been through the RSpec Stories PeepCode and some >> various >> other readings online, and now I'm trying to build a dummy >> applica

Re: [rspec-users] Trouble with my first Story

2008-03-26 Thread Glenn Ford
ion/create actually doing a > redirect? A similar rspec test works for me. > > -- > Matt Berther > http://www.mattberther.com > > > > > On Mar 26, 2008, at 5:51 PM, Glenn Ford wrote: > >> On Mar 26, 2008, at 6:28 PM, Chuck Remes wrote: >> >>> &

Re: [rspec-users] Trouble with my first Story

2008-03-26 Thread Glenn Ford
That was it, thank you! Must have been a long day, I can't believe I didn't spot that :) On Mar 26, 2008, at 10:15 PM, David Chelimsky wrote: > On Wed, Mar 26, 2008 at 5:02 PM, Glenn Ford <[EMAIL PROTECTED]> wrote: >> Hi all! I've been through the RSpec Stories

[rspec-users] Confusing error with GivenStory

2008-03-31 Thread Glenn Ford
Hey all! I'm loving Stories so far, but I ran across a difficult error today that I felt should have resulted in a "PENDING" message. Here's what I got: /Users/Malohkan/Sites/blog/vendor/plugins/rspec_on_rails/lib/spec/ rails/../../../../rspec/lib/spec/story/runner/scenario_runner.rb:11:in

Re: [rspec-users] Confusing error with GivenStory

2008-03-31 Thread Glenn Ford
he subject which should have been GivenScenario. I guess I'm full of typos today! Glenn On Mar 31, 2008, at 11:34 AM, David Chelimsky wrote: On Mon, Mar 31, 2008 at 11:16 AM, Glenn Ford <[EMAIL PROTECTED]> wrote: Hey all! I'm loving Stories so far, but I ran across a diff

Re: [rspec-users] Stub an instance method for every new instance of a class

2008-04-01 Thread Glenn Ford
I think the general consensus is that if you need this feature, then you have ugly code that needs cleaning up :) If you're in a situation like me, where you're too noob to figure out a better solution for some legacy code that you inherited, go to this url and find the instructions for in

Re: [rspec-users] Need some help with a simple

2008-04-07 Thread Glenn Ford
I'm guessing the key is inside "find_account_by_subdomain_or_url". Do you have that defined somewhere? It probably calls something like: @account = Account.find_by_subdomain(blah) or Account.find_by_url(blah) In which case that's probably what you need to stub. Nothing is actually checking

Re: [rspec-users] how to mock/stub restful_authenticated and acl2-ized actions

2008-04-08 Thread Glenn Ford
While my approach might not be the best, since I don't stub :login_required, it still serves me well. I would do something like this: user = mock_model(User, :operator => true) controller.stub!(:current_user).and_return(user) login_required will find the 'current_user' and be happy. I don't

Re: [rspec-users] Multi-line steps

2008-04-10 Thread Glenn Ford
On Apr 9, 2008, at 5:04 PM, Pat Maddox wrote: > On 4/9/08, Ashley Moran <[EMAIL PROTECTED]> wrote: >> >> On 9 Apr 2008, at 14:14, aslak hellesoy wrote: >> >>> Just a style comment: I usually strive for a single When (in this >>> case >>> Fred uploads the csv file). >>> The other ones are Givens

Re: [rspec-users] Multi-line steps

2008-04-10 Thread Glenn Ford
>> This actually sounds more confusing to me when viewed in the context >> of my own stories, and it seems similar to what's going on here. I >> write a lot about the user's interaction with the site and what >> should >> happen, so I have a lot of stories that look like: >> >> Given database is

Re: [rspec-users] ANN: RSpactor 0.9.10 (aka. beta)

2008-04-30 Thread Glenn Ford
Works for me! However I have a feature request. Currently I exclude certain files like so: Autotest.add_hook :initialize do |at| %w{this_kind that_kind .git vendor .blah}.each {|exception| at.add_exception(exception)} end Will there be a way to do something like this with RSpactor? I li