Re: [rspec-users] Recognising RSpec files in the Textmate bundle

2010-08-07 Thread Phillip Koebbe
On 2010-08-07 5:44 PM, David Chelimsky wrote: On Aug 7, 2010, at 5:28 PM, Ashley Moran wrote: Hi Did the RSpec TMBundle ever have multiple ways of recognising RSpec files? I'm convinced it user to look for "spec_helper" on the first line. I'm pretty sure it never did that. The Ruby bundl

Re: [rspec-users] RSpec 2 autotest file

2010-08-07 Thread David Chelimsky
On Aug 7, 2010, at 4:54 PM, Ashley Moran wrote: > Hi > > I've tried using the autotest file from RSpec 2 (lib/autotest/rspec2.rb) but > I've found a problem with it, that I think is a bug. > > The file contains two sections > > * an Autotest `Autotest.add_hook :initialize` block > * an Autote

Re: [rspec-users] Recognising RSpec files in the Textmate bundle

2010-08-07 Thread David Chelimsky
On Aug 7, 2010, at 5:28 PM, Ashley Moran wrote: > Hi > > Did the RSpec TMBundle ever have multiple ways of recognising RSpec files? > I'm convinced it user to look for "spec_helper" on the first line. I'm pretty sure it never did that. > The Ruby bundle does something similar, as it looks for

[rspec-users] Recognising RSpec files in the Textmate bundle

2010-08-07 Thread Ashley Moran
Hi Did the RSpec TMBundle ever have multiple ways of recognising RSpec files? I'm convinced it user to look for "spec_helper" on the first line. The Ruby bundle does something similar, as it looks for "firstLineMatch = '^#!/.*\bruby';" The reason I ask is because I now have several files that

Re: [rspec-users] Name collision - how would you handle this?

2010-08-07 Thread David Chelimsky
On Aug 7, 2010, at 4:37 PM, Ashley Moran wrote: > On 7 Aug 2010, at 22:10, David Chelimsky wrote: > >> So - what should we do? I don't think changing Minitest is really an option, >> as too many assertion libraries already wrap Minitest assertions. I don't >> think RSpec should be in the busine

[rspec-users] RSpec 2 autotest file

2010-08-07 Thread Ashley Moran
Hi I've tried using the autotest file from RSpec 2 (lib/autotest/rspec2.rb) but I've found a problem with it, that I think is a bug. The file contains two sections * an Autotest `Autotest.add_hook :initialize` block * an Autotest class "Autotest::Rspec2" In one project I'm working on, the code

Re: [rspec-users] Name collision - how would you handle this?

2010-08-07 Thread Ashley Moran
On 7 Aug 2010, at 22:10, David Chelimsky wrote: > So - what should we do? I don't think changing Minitest is really an option, > as too many assertion libraries already wrap Minitest assertions. I don't > think RSpec should be in the business of monitoring methods end-users define > to make su

[rspec-users] Name collision - how would you handle this?

2010-08-07 Thread David Chelimsky
Hey all, It turns out that if you have * Rails (2 or 3) * Ruby-1.9 * a model named Message * let(:message) or def message in an example group * a Rails assertion in an example in that group * note that rspec-rails' matchers delegate to Rails' assertions You'll get an error saying "wrong number

[rspec-users] Release of RSpec for Generators 0.4.0

2010-08-07 Thread Kristian Mandrup
Now with a full RSpec 2 test suite to demonstrate most of its features. Wiki to be updated with latest changes ASAP. http://github.com/kristianmandrup/rspec_for_generators This gem makes it very easy to spec that your generator generates files as expected and also lets you easily verify that the

Re: [rspec-users] How do I extend ExampleGroup in Rspec 2?

2010-08-07 Thread David Chelimsky
On Aug 7, 2010, at 10:15 AM, David Chelimsky wrote: > On Aug 7, 2010, at 10:04 AM, Kristian Mandrup wrote: > >> Thanks, but it didn't work. The following somewhat ugly hack works >> however. >> >> module RSpec::Core >> class ExampleGroup >> def with_generator &block >> RSpec::Generator.wi

Re: [rspec-users] How do I extend ExampleGroup in Rspec 2?

2010-08-07 Thread David Chelimsky
On Aug 7, 2010, at 10:04 AM, Kristian Mandrup wrote: > Thanks, but it didn't work. The following somewhat ugly hack works > however. > > module RSpec::Core > class ExampleGroup >def with_generator &block > RSpec::Generator.with_generator &block >end > >def setup_generator test_

Re: [rspec-users] How do I extend ExampleGroup in Rspec 2?

2010-08-07 Thread Kristian Mandrup
Thanks, but it didn't work. The following somewhat ugly hack works however. module RSpec::Core class ExampleGroup def with_generator &block RSpec::Generator.with_generator &block end def setup_generator test_method_name=nil, &block RSpec::Generator.setup_generator test_m

Re: [rspec-users] How do I extend ExampleGroup in Rspec 2?

2010-08-07 Thread David Chelimsky
On Aug 7, 2010, at 8:23 AM, Kristian Mandrup wrote: > I simply want all methods of a module to be always available within > the context of an Example group. > > module RSpec > module Generator > def with_generator &block > ... > end > > def setup_generator test_method_name

[rspec-users] How do I extend ExampleGroup in Rspec 2?

2010-08-07 Thread Kristian Mandrup
I simply want all methods of a module to be always available within the context of an Example group. module RSpec module Generator def with_generator &block ... end def setup_generator test_method_name=nil, &block ... end end end How do I achieve this?

Re: [rspec-users] Could not find generator rspec:install.

2010-08-07 Thread David Chelimsky
On Aug 6, 2010, at 12:39 PM, SWEngineer wrote: > I'm trying to follow this tutorial here: > http://railstutorial.org/chapters/static-pages#top > > When I run: > > $ rails generate rspec:install > > I get: > > Could not find generator rspec:install. > > What could be the problem? The tutoria

[rspec-users] Could not find generator rspec:install.

2010-08-07 Thread SWEngineer
I'm trying to follow this tutorial here: http://railstutorial.org/chapters/static-pages#top When I run: $ rails generate rspec:install I get: Could not find generator rspec:install. What could be the problem? Thanks. ___ rspec-users mailing list rs