Re: [rspec-users] Such a simple test fails. But why ?

2012-02-15 Thread Morten Møller Riis
This looks a little funny in my phone. But what happens if you do this? ... options = Options.new(argv) puts "argv[0]: #{argv[0]}" puts "argv[1]: #{argv[1]}" ... Best regards Morten Sent from my iPhone On 15/02/2012, at 19.26, Serguei Cambour wrote: > I just tried to integrate a simple test

Re: [rspec-users] Such a simple test fails. But why ?

2012-02-15 Thread Justin Ko
On Feb 15, 2012, at 9:57 AM, Serguei Cambour wrote: > I just tried to integrate a simple test to check some options passed as > argument to a class to be executed: > [code] > require 'spec_helper' > > module PropertyInjector > describe Options do >describe "#source folder option" do >

Re: [rspec-users] Such a simple test fails. But why ?

2012-02-15 Thread Katrina Owen
On rereading, I see that you do parse the options using the parse! method, so the answer is to use parse(argv) instead of parse!(argv). The == vs eq() is probably irrelevant. Sorry to have brought it up. As an aside, i would recommend using a gist with an actual working (failing) examole, as that

Re: [rspec-users] Such a simple test fails. But why ?

2012-02-15 Thread Katrina Owen
On Wed, Feb 15, 2012 at 5:57 PM, Serguei Cambour wrote: > WHY the second argument is NIL if it WAS NOT before > (path/to/some/folder)? If you change this: > options.export_folder.should == argv[1] to this: options.export_folder.should eq(argv[1]) You will see that you get the value that you've

[rspec-users] Such a simple test fails. But why ?

2012-02-15 Thread Serguei Cambour
I just tried to integrate a simple test to check some options passed as argument to a class to be executed: [code] require 'spec_helper' module PropertyInjector describe Options do describe "#source folder option" do it "sets up a source folder" do argv = %w{-e path/to/some/fol

Re: [rspec-users] Should I use cucumber or Controller RSpecs or both?

2012-02-15 Thread Cathal Curtis
Cathal Curtis wrote in post #1046554: I found what I think is the answer to my question by chance while doing some further searching on the web: http://groups.google.com/group/ruby-capybara/browse_thread/thread/7b6c92e4c96c9135 Jonas Nicklas describes it as using the wrong tool for the job. Capyb