FeaturesPluginsDocs & SupportCommunityPartners

NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

Using netbeans with rspec-1.2.7

 
Post new topic   Reply to topic    NetBeans Forums -> Ruby Users
View previous topic :: View next topic  
Author Message
michaelp



Joined: 08 Jul 2009
Posts: 1

PostPosted: Wed Jul 08, 2009 11:54 am    Post subject: Using netbeans with rspec-1.2.7 Reply with 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 Smile. 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
View user's profile Send private message
dyrathror



Joined: 20 Aug 2008
Posts: 42

PostPosted: Wed Jul 08, 2009 3:45 pm    Post subject: Reply with quote

Thanks,

suddenly my RSpec's are working also with version 1.2.7

D.

_________________
If all else fails, read the manuals.
Back to top
View user's profile Send private message
Erno Mononen
Posted via mailing list.





PostPosted: Thu Jul 09, 2009 5:11 am    Post subject: Using netbeans with rspec-1.2.7 Reply with quote

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 Smile. 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
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> Ruby Users All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB