Hey all, Has any one ever tested or try to test c code with rspec? I am using system calls to my compiled c program and testing against the standard output but I would like to get a lot more granular than this. I have experimented with using RubyInline to test individual functions and that works on functions that are not calling other c functions. I have some other ideas on how to do this but they all seem around about ways... I have never used RubyInline before nor have I integrated c or c++ with Ruby before so I''m guessing there is a much better way to go about this. Any ideas/suggestions on how to best test c code with rSpec? Thanks, Ben
Ben Mabey wrote:> Hey all, > Has any one ever tested or try to test c code with rspec? I am using > system calls to my compiled c program and testing against the standard > output but I would like to get a lot more granular than this. I have > experimented with using RubyInline to test individual functions and that > works on functions that are not calling other c functions. I have some > other ideas on how to do this but they all seem around about ways... I > have never used RubyInline before nor have I integrated c or c++ with > Ruby before so I''m guessing there is a much better way to go about > this. Any ideas/suggestions on how to best test c code with rSpec? > Thanks, > Ben > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users >Hmm.. I''m looking into SWIG right now and it is looking promising.... From what I am reading it doesn''t look like it would be too hard to test c with rspec via SWIG. I''d still be curious about any suggestions everyone else might have. Thanks, Ben
Ben Mabey wrote:> Hey all, > Has any one ever tested or try to test c code with rspec? I am using > system calls to my compiled c program and testing against the standard > output but I would like to get a lot more granular than this. I have >I''ve specified Ruby C extensions using RSpec, but not just regular C applications. My suggestion is to write Ruby C wrappers, if you *really* want to use RSpec to specify your C. I might be interested in helping you with this if you want to hit me via email off-list. -Steven
El 27/8/2007, a las 6:00, Steven R. Baker escribi?:> Ben Mabey wrote: >> Hey all, >> Has any one ever tested or try to test c code with rspec? I am using >> system calls to my compiled c program and testing against the >> standard >> output but I would like to get a lot more granular than this. I have >> > I''ve specified Ruby C extensions using RSpec, but not just regular C > applications. My suggestion is to write Ruby C wrappers, if you > *really* want to use RSpec to specify your C.That''s what I''ve done in the past as well and have been very happy with the results. Cheers, Wincent