Re: [rspec-users] Comparing files

2010-12-10 Thread George Dinwiddie
On 12/10/10 12:07 PM, Josh Chisholm wrote: On Fri, Dec 10, 2010 at 4:30 PM, George Dinwiddie wrote: I once saw (but now cannot find) and image compare library that did a "fuzzy compare" that wasn't fooled by pixel differences. I've looked for this several times, but haven't been able to turn

[rspec-users] "unit" vs. "functional" specs

2010-12-10 Thread Andrew Wagner
I went back and forth on whether to send this to this list or the ruby-talk list, so feel free to tell me to take a hike... I'm working on a personal project where I'm trying to keep a really high bar on quality. One of the ways I'm doing that is to stick very close to the BDD/TDD cycle as suggest

Re: [rspec-users] Comparing files

2010-12-10 Thread Ben Mabey
On 12/10/10 8:56 AM, Matt Wynne wrote: Hello folks, I'm writing some tests for file upload code. The files are binary, images mostly. I'm futzing around a bit, trying to figure out how to assert that the uploaded file is the same as some golden master. If I do this: File.read(uploaded_file_pa

[rspec-users] RSpec2: How to avoid an example run when previous failed

2010-12-10 Thread Gennady Bystritsky
Is there a way not to execute an example when another one fails? I want to minimize failure noises in cases when, say, one spec checks that an array has an expected number of elements while the others drill down on a specific element. However, when there's a wrong number of elements in the first

Re: [rspec-users] RSpec2 not supported in Netbeans

2010-12-10 Thread Paul Nelligan
Generally I use the command line for testing. Netbeans can be a little flakey. That said, check the config of your project in netbeans. Some of the defaults applied by netbeans aren't always the correct options. sent via Android mobile On 10 Dec 2010 17:11, "George Dinwiddie" wrote: > On 12/

Re: [rspec-users] Comparing files

2010-12-10 Thread Josh Chisholm
On Fri, Dec 10, 2010 at 4:30 PM, George Dinwiddie wrote: > Matt, > > On 12/10/10 9:56 AM, Matt Wynne wrote: >> >> Hello folks, >> >> I'm writing some tests for file upload code. The files are binary, >> images mostly. I'm futzing around a bit, trying to figure out how to >> assert that the uploade

Re: [rspec-users] Comparing files

2010-12-10 Thread Joseph Wilk
On Fri, Dec 10, 2010 at 3:56 PM, Matt Wynne wrote: > Hello folks, > > I'm writing some tests for file upload code. The files are binary, images > mostly. I'm futzing around a bit, trying to figure out how to assert that the > uploaded file is the same as some golden master. If I do this: > > Fil

Re: [rspec-users] Comparing files

2010-12-10 Thread George Dinwiddie
Matt, On 12/10/10 9:56 AM, Matt Wynne wrote: Hello folks, I'm writing some tests for file upload code. The files are binary, images mostly. I'm futzing around a bit, trying to figure out how to assert that the uploaded file is the same as some golden master. If I do this: File.read(uploaded_fi

Re: [rspec-users] Comparing files

2010-12-10 Thread Ben Lovell
Cyclic redundancy check (crc) Sent from my iPhone On 10 Dec 2010, at 15:56, Matt Wynne wrote: > Hello folks, > > I'm writing some tests for file upload code. The files are binary, images > mostly. I'm futzing around a bit, trying to figure out how to assert that the > uploaded file is the sa

Re: [rspec-users] RSpec2 not supported in Netbeans

2010-12-10 Thread George Dinwiddie
On 12/10/10 5:43 AM, Babitha Augusthy wrote: Hi All, RSpec2 doesn't seem to be supported in Netbeans. When I try to run RSpec in Netbeans, it says the command 'spec' not found. Does anybody have any information if this will be corrected? I don't know beans about Netbeans, but try the command 'r

Re: [rspec-users] Comparing files

2010-12-10 Thread Joseph Wilk
On 10/12/2010 15:56, Matt Wynne wrote: > Hello folks, > > I'm writing some tests for file upload code. The files are binary, images > mostly. I'm futzing around a bit, trying to figure out how to assert that the > uploaded file is the same as some golden master. If I do this: > > File.read(upload

Re: [rspec-users] Comparing files

2010-12-10 Thread Joseph Wilk
On 10/12/2010 15:56, Matt Wynne wrote: > Hello folks, > > I'm writing some tests for file upload code. The files are binary, images > mostly. I'm futzing around a bit, trying to figure out how to assert that the > uploaded file is the same as some golden master. If I do this: > > File.read(upload

Re: [rspec-users] Comparing files

2010-12-10 Thread Evgeniy Dolzhenko
I would just compare the size. Or you can get the MD5 and compare that to be 100% sure, and avoid the ugly diff too. On 12/10/2010 6:56 PM, Matt Wynne wrote: Hello folks, I'm writing some tests for file upload code. The files are binary, images mostly. I'm futzing around a bit, trying to figu

Re: [rspec-users] Comparing files

2010-12-10 Thread Matt Wynne
On 10 Dec 2010, at 15:56, Matt Wynne wrote: > Hello folks, > > I'm writing some tests for file upload code. The files are binary, images > mostly. I'm futzing around a bit, trying to figure out how to assert that the > uploaded file is the same as some golden master. If I do this: > > File.re

[rspec-users] Comparing files

2010-12-10 Thread Matt Wynne
Hello folks, I'm writing some tests for file upload code. The files are binary, images mostly. I'm futzing around a bit, trying to figure out how to assert that the uploaded file is the same as some golden master. If I do this: File.read(uploaded_file_path).should == File.read(path_to_expected_

[rspec-users] RSpec2 not supported in Netbeans

2010-12-10 Thread Babitha Augusthy
Hi All, RSpec2 doesn't seem to be supported in Netbeans. When I try to run RSpec in Netbeans, it says the command 'spec' not found. Does anybody have any information if this will be corrected? Thanks, Babitha ___ rspec-users mailing list rspec-users@ruby

Re: [rspec-users] Problems running RSpec 2 with autotest/autospec

2010-12-10 Thread Rick DeNatale
Michelle, I think that the problem is that after that setup you want to use the command autotest and NOT autospec The book pages you have in your picture say that autospec has been removed from rspec2 but don't state explicitly that you should use the autotest command rather than autospec. Since

Re: [rspec-users] Transactional fixtures for Gem (not Rails) development

2010-12-10 Thread David Chelimsky
On Dec 10, 2010, at 6:14 AM, medihack wrote: > Hello. > > Is it possible to also use the transactional examples feature for gem > (not Rails) development. Nope. That feature is not implemented in RSpec, it is implemented in Rails. RSpec just provides access to it. > It seems that one has to re

Re: [rspec-users] Problems running RSpec 2 with autotest/autospec

2010-12-10 Thread David Chelimsky
On Dec 10, 2010, at 1:18 AM, Michelle Pace wrote: > Thanks (again) Dave for your reply and the time you've taken. > > However I think I must be really bad at explaining myself... so I've > drawn a picture for you which to show my problem. [One of the > requirements in the book is that I have to

[rspec-users] Transactional fixtures for Gem (not Rails) development

2010-12-10 Thread medihack
Hello. Is it possible to also use the transactional examples feature for gem (not Rails) development. It seems that one has to require "rspec- rails", but I still can't get it to work. I added this to my spec_helper.rb: RSpec.configure do |config| config.use_transactional_fixtures = true end A