Ability to run specs on individual components #114

Closed
dmarkow opened this Issue Jul 22, 2012 · 9 comments

Projects

None yet

3 participants

@dmarkow
Member
dmarkow commented Jul 22, 2012

An issue arose (#113) where only loading the HTTP module (require 'bubble-wrap/http') was failing because it required other components of BubbleWrap which were not loaded automatically.

It would be handy to be able to run specs against each module/wrapper individually without requiring bubble-wrap/all. Not sure if this is even possible with the current spec system short of making a bunch of but it's something to consider.

@jamesotron

I'm sorry, I don't follow. Can you repeat the question?

@dmarkow
Member
dmarkow commented Jul 22, 2012

Sorry -- right now, when you run the test suite, the Rakefile requires bubble-wrap/all. So when you're testing the HTTP module, it already has the rest of BubbleWrap loaded, leaving no way to find out if we're missing requirements in the lib/bubble-wrap/http.rb file.

It'd be nice to be able to run the HTTP module specs with only the specific required files from lib/bubble-wrap/http.rb. In the case of #113, the specs would fail when BW.create_uuid is called, since its file wasn't properly required.

@jamesotron

Ahh. That makes sense. It should be fairly easy to create new tasks that iterates through all the modules and requires them and runs the specs with the files= argument. PDI :)

@supermarin
Member

@jamesotron can we close this one or it's still in progress? :)

I'm able to run only http_spec.rb with rake spec files=http_spec

@dmarkow
Member
dmarkow commented Jul 31, 2012

@mneorr This is a slightly different issue. When you run rake spec files=http_spec, the Rakefile is still doing a require 'bubble-wrap/all'. Since the README is telling people that they can use just certain parts of BubbleWrap, then we should be testing that they can indeed do so.

So what I'd like to be able to do is the equivalent of the Rakefile only saying require 'bubble-wrap/http', then running just the http_spec file (which before 84f8555 would have failed on BW.create_uuid)

I plan to work on this soon, when I can find some time, but I'd leave the issue open for now.

@supermarin
Member

@dmarkow sure, thanks

@supermarin
Member

@dmarkow is there any updates on this one?

@dmarkow
Member
dmarkow commented Dec 16, 2012

I haven't had any time to spend on this, unfortunately. It'd still be nice to have the ability to do this some day, but it's not an actual bug in the library.

@supermarin
Member

Okay, then I'll close it to clean up the board :)

@supermarin supermarin closed this Dec 17, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment