| View previous topic :: View next topic |
| Author |
Message |
michaelp
Joined: 08 Jul 2009 Posts: 1
|
Posted: Wed Jul 08, 2009 11:54 am Post subject: Using netbeans with rspec-1.2.7 |
|
|
Just thought I'd let people know that rpsec-1.2.7 seems to have changed the way you get the line number from a spec file.
As a result, netbeans 6.7 won't run specs if you have 1.2.7 installed. The fix I've implemented (ymmv) is to change nb_rspec_mediator.rb. This lives in /usr/local/netbeans-6.7/ruby2/nb_rspec_mediator.rb on my linux machine.
Line 204 defines NbSpecParser, but it extends a class that no longer exists.
Change that line to:
class NbSpecParser < Spec::Runner::LineNumberQuery
and all should be well again . You now won't be able to run with rspec < 1.2.7, so if that's required, you might need some conditional logic around the class definition.
Anyway, I hope this helps someone.
Michael |
|
| Back to top |
|
 |
dyrathror
Joined: 20 Aug 2008 Posts: 42
|
Posted: Wed Jul 08, 2009 3:45 pm Post subject: |
|
|
Thanks,
suddenly my RSpec's are working also with version 1.2.7
D. _________________ If all else fails, read the manuals. |
|
| Back to top |
|
 |
Erno Mononen Posted via mailing list.
|
Posted: Thu Jul 09, 2009 5:11 am Post subject: Using netbeans with rspec-1.2.7 |
|
|
Hi Michael,
Thanks a lot for sharing this, I'll modify nb_spec_mediator.rb
accordingly (I'll also try to some logic to make it compatible with
older versions too).
Cheers,
Erno
michaelp wrote:
| Quote: | Just thought I'd let people know that rpsec-1.2.7 seems to have changed the way you get the line number from a spec file.
As a result, netbeans 6.7 won't run specs if you have 1.2.7 installed. The fix I've implemented (ymmv) is to change nb_rspec_mediator.rb. This lives in /usr/local/netbeans-6.7/ruby2/nb_rspec_mediator.rb on my linux machine.
Line 204 defines NbSpecParser, but it extends a class that no longer exists.
Change that line to:
class NbSpecParser < Spec::Runner::LineNumberQuery
and all should be well again . You now won't be able to run with rspec < 1.2.7, so if that's required, you might need some conditional logic around the class definition.
Anyway, I hope this helps someone.
Michael
|
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|
|
|