Re: [rspec-users] Reusing Spec's

2011-05-18 Thread Ken Egervari
Thanks strange... I have installed Ruby 1.9.2 and that's what comes up in the command line: egervari@egervari:~/Projects/training$ ruby --version ruby 1.9.2p180 (2011-02-18 revision 30909) [x86_64-linux] However, you're right... RubyMine seems to be using 1.9.1. Thanks for the catch! I think it's

Re: [rspec-users] Reusing Spec's

2011-05-18 Thread Ken Egervari
Oh, never mind. I tried this in spec_helper.rb and it works ;) Ken On Wed, May 18, 2011 at 9:33 PM, Ken Egervari wrote: > Hi Justin > > I tried that config.include call in my test.rb file, but Rails complains:: > > /usr/local/lib/ruby/gems/1.9.1/gems/railties-3.0.7/lib/rails/railtie/configurati

Re: [rspec-users] Reusing Spec's

2011-05-18 Thread Justin Ko
On Wed, May 18, 2011 at 8:33 PM, Ken Egervari wrote: > Hi Justin > > I tried that config.include call in my test.rb file, but Rails complains:: > > /usr/local/lib/ruby/gems/1.9.1/gems/railties-3.0.7/lib/rails/railtie/configuration.rb:77:in > `method_missing': undefined method `include' for > # (No

Re: [rspec-users] Reusing Spec's

2011-05-18 Thread Ken Egervari
Hi Justin I tried that config.include call in my test.rb file, but Rails complains:: /usr/local/lib/ruby/gems/1.9.1/gems/railties-3.0.7/lib/rails/railtie/configuration.rb:77:in `method_missing': undefined method `include' for # (NoMethodError) from /home/egervari/Projects/training/config/envi

Re: [rspec-users] Reusing Spec's

2011-05-18 Thread Justin Ko
On Wed, May 18, 2011 at 10:23 AM, Ken Egervari wrote: > Hello, > > Is there any way to reuse spec definitions, perhaps through some kind of > inheritance? > > For example, in rails, every time it generates a Spec I must tell it to > > 1) Include Devise::TestHelpers > you can do: RSpec.configurat

Re: [rspec-users] Reusing Spec's

2011-05-18 Thread David Chelimsky
On May 18, 2011, at 11:23 AM, Ken Egervari wrote: > Hello, > > Is there any way to reuse spec definitions, perhaps through some kind of > inheritance? > > For example, in rails, every time it generates a Spec I must tell it to > > 1) Include Devise::TestHelpers > 2) Log the user in, so there i

[rspec-users] Reusing Spec's

2011-05-18 Thread Ken Egervari
Hello, Is there any way to reuse spec definitions, perhaps through some kind of inheritance? For example, in rails, every time it generates a Spec I must tell it to 1) Include Devise::TestHelpers 2) Log the user in, so there is a default user setup before each test is run. This is common for 95%