Open davorb opened 11 years ago
If you have any questions about this, please feel free to ask us - we'd love to help you get started with this =)
@PragTob Who are you talking to? :/
@davorb haha sorry, was meant towards potential new contributors :-)
OK I'm taking a crack at this...
:+1:
Thanks a lot! :-)
If you need some help/pointers/hints for this please let us know. Personally I'm pretty busy up until including this Sunday but there are also lots of other nice people around =D
I haven't forgotten about this... Just haven't had as much time as I thought to mess with it.
I've got it receiving the :download (at least directly, not with vcr_casettes yet) but having trouble asserting that the width and height are correct for nasa50th.gif.
Was hoping I could do something like this:
assert_equal 300, subject.real.image_data.width
but I get: undefined method `assert_equal' for #RSpec::Core::ExampleGroup::Nested_58::Nested_6:0x650908b5
..still playing...
Hi there @DaveCollinsJr
we are using RSpec so the correct syntax would be: subject.width.should eq 300
(I believe as subject should be the image, we generally don't try to make assertions on attributes of real)
Hope that helps and thank you a lot for working on this :-)
Tobi
Is this still a need? I see specs for drawing, painting, and dimensions but not much else. I'm looking for a place to jump in and start contributing. I welcome any updated suggestions on areas needing help.
Hey @scottescue! Looking over the specs I think the original comments on this issue still hold--there isn't any testing of the image loading in any significant way.
I see a couple things/ways this could get tested:
spec/shoes/images/shoe.jpg
)spec/shoes/download_spec.rb
To my eye those are probably in increasing order of the difficulty, but whatever catches your eye to add would be awesome!
There are a bunch of specs missing from
swt/image.rb
. Loading of remote images (download_and_display_real_image
) isn't tested at all.It might be a good idea to first have a look at 83c5531 before writing the tests.