Re: [rspec-users] More Rails Pattern Examples?

2007-11-12 Thread Carl Porth
On Nov 12, 2007, at 6:18 PM, Pat Maddox wrote: On Nov 12, 2007 5:38 PM, Vidal Graupera <[EMAIL PROTECTED]> wrote: Hi, I have been reading the documentation and examples on the rspec site. There are two "patterns" from Rails that I am not clear how to implement that are kind of related, and so

Re: [rspec-users] fixture_file_upload and edge rspec?

2007-11-11 Thread Carl Porth
On Nov 11, 2007, at 8:29 AM, Leslie Freeman wrote: Slowly digging to the bottom of this one. If I add Test::Unit::TestCase.fixture_path = RAILS_ROOT + '/spec/fixtures/' to my spec_helper.rb, then everything runs fine. So presumably there is somewhere that config.fixture_path from the Spec::R

[rspec-users] TextMate File Type Detection for RSpec & Rails

2007-10-15 Thread Carl Porth
For those of you struggling with TextMate not properly detecting rspec files, Allan Odgaard (the author of TextMate) has kindly provided a tutorial on how to set up TextMate to associate all .rb files with rails and all _spec.rb files with rspec. http://macromates.com/blog/2007/file-type-det

Re: [rspec-users] [RSpec] Unexpected behavior using TextMate Bundle...

2007-10-13 Thread Carl Porth
I think I had this problem. The difference in behavior is due to TM using different shell environments due to how you are launching it. I think I did something like: http://blog.dnite.org/2007/8/28/textmate-and-your-environment-variables Just substitute in your shell PATH into the one in t

Re: [rspec-users] TextMate language weirdness

2007-10-04 Thread Carl Porth
Thanks for the tip, I'll report back if I find a solution. Carl On Oct 3, 2007, at 4:08 PM, Wincent Colaiuta wrote: > El 3/10/2007, a las 22:23, Carl Porth escribió: > >> I'm having trouble with TextMate and assigning the RSpec language to >> *_spec.rb files within r

Re: [rspec-users] TextMate language weirdness

2007-10-03 Thread Carl Porth
uld be fixed that would be ideal. I'm > running > "cutting edge" version of Textmate. How about you? Maybe it has > something to do with that. > > Carl Porth wrote: >> I'm having trouble with TextMate and assigning the RSpec language to >> *_

[rspec-users] TextMate language weirdness

2007-10-03 Thread Carl Porth
I'm having trouble with TextMate and assigning the RSpec language to *_spec.rb files within rails projects. Here is what is happening: I'm in a file that has the language "Ruby on Rails" selected. I do a ctrl-shift-down to switch to the corresponding _spec.rb file. The _spec.rb file has the lan

Re: [rspec-users] How do I best setup data for Story Runner?

2007-09-27 Thread Carl Porth
On Sep 27, 2007, at 12:41 PM, Pat Maddox wrote: > On 9/26/07, Simon Peter Nicholls <[EMAIL PROTECTED]> wrote: >> Just started looking at the Story Runner integration, and am >> converting a few Rails integration tests to get a feel for it. >> >> My integration tests relied on fixtures, and since m

Re: [rspec-users] Removing an AR class definition, for testing plugins

2007-09-10 Thread Carl Porth
You can do something like in rspec/spec/spec/mocks/stub_spec.rb where the class is defined in before(:each). This way your specs aren't dependent on an external class definition. Carl On Sep 10, 2007, at 3:12 PM, Pat Maddox wrote: > I'm writing an acts_as_* plugin and am trying to BDD it.

Re: [rspec-users] Stubbing Observers in rails?

2007-07-31 Thread Carl Porth
Mocha has an any_instance method that does this and flexmock has a new_instances method that does the same. I tried patching the rspec mocking framework to do this and got it working for new instances, but I couldn't get it working with passing arguments to the initialize method. That and t