From fernando.garcia at the-cocktail.com Fri Feb 1 15:43:08 2008 From: fernando.garcia at the-cocktail.com (=?ISO-8859-1?Q?Fernando_Garc=EDa_Samblas?=) Date: Fri, 01 Feb 2008 21:43:08 +0100 Subject: [rspec-devel] Stories in other languages Message-ID: <47A3845C.6090908@the-cocktail.com> Hello, I've just subscribed to the RSpec lists and first of all I'd like to thank you all for such a great work. I'm really having a great time developing with RSpec. I think it would be nice for developers with non-english clients to open the possibility for writing RSpec Stories in other languages. Currently the story template words ("Story", "Scenario", "Given", etc.) are hard coded, but it shouldn't be difficult to manage them as a configurable hash. I don't have a good knowledge of the code behind RSpec but I've managed to modify 1.1.3 (r3281) code to achieve that goal. Now I can run my brand-new spanish stories! I send the differences with the 3281 revision attached. Before I run the stories I set the value of the words: Spec::Runner.configure do |config| config.with_story_template_words({ :story => "Relato", :scenario => 'Escenario', :given => 'Dado', :given_scenario => 'DadoElEscenario', :when => 'Cuando', :then => 'Entonces', :and => 'Y' }) end I'm sure it's not the best way to implement the functionality, but I just want to let you know the desire and a (very) simple way to get it (partially, I only use PlainText output) done. Thanks for listening ;) Cheers! Nando -- Fernando Garc?a Samblas fernando.garcia at the-cocktail.com The Cocktail C/ Salamanca 17 28020 Madrid +34 91 567 06 05 -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rspec_r3281_with_story_template_words.diff Url: http://rubyforge.org/pipermail/rspec-devel/attachments/20080201/d4323703/attachment.pl From dchelimsky at gmail.com Fri Feb 1 16:40:05 2008 From: dchelimsky at gmail.com (David Chelimsky) Date: Fri, 1 Feb 2008 15:40:05 -0600 Subject: [rspec-devel] Stories in other languages In-Reply-To: <47A3845C.6090908@the-cocktail.com> References: <47A3845C.6090908@the-cocktail.com> Message-ID: <57c63afe0802011340vdfce98ex75ab83e3f4d0a0ad@mail.gmail.com> Would you please submit this to our tracker at http://rspec.lighthouseapp.com? Gracias, David On Feb 1, 2008 2:43 PM, Fernando Garc?a Samblas wrote: > > Hello, > > I've just subscribed to the RSpec lists and first of all I'd like to > thank you all for such a great work. I'm really having a great time > developing with RSpec. > > I think it would be nice for developers with non-english clients to open > the possibility for writing RSpec Stories in other languages. > > Currently the story template words ("Story", "Scenario", "Given", etc.) > are hard coded, but it shouldn't be difficult to manage them as a > configurable hash. > > I don't have a good knowledge of the code behind RSpec but I've managed > to modify 1.1.3 (r3281) code to achieve that goal. Now I can run my > brand-new spanish stories! > > I send the differences with the 3281 revision attached. Before I run the > stories I set the value of the words: > > Spec::Runner.configure do |config| > config.with_story_template_words({ > :story => "Relato", > :scenario => 'Escenario', > :given => 'Dado', > :given_scenario => 'DadoElEscenario', > :when => 'Cuando', > :then => 'Entonces', > :and => 'Y' > }) > end > > I'm sure it's not the best way to implement the functionality, but I > just want to let you know the desire and a (very) simple way to get it > (partially, I only use PlainText output) done. > > Thanks for listening ;) > > Cheers! > Nando > > -- > Fernando Garc?a Samblas > fernando.garcia at the-cocktail.com > > The Cocktail > C/ Salamanca 17 > 28020 Madrid > +34 91 567 06 05 > > > Index: lib/spec/story/runner/story_parser.rb > =================================================================== > --- lib/spec/story/runner/story_parser.rb (revision 7) > +++ lib/spec/story/runner/story_parser.rb (working copy) > @@ -26,13 +26,20 @@ > def process_line(line) > line.strip! > case line > - when /^Story: / then @state.story(line) > - when /^Scenario: / then @state.scenario(line) > - when /^Given:? / then @state.given(line) > - when /^GivenScenario:? / then @state.given_scenario(line) > - when /^When:? / then @state.event(line) > - when /^Then:? / then @state.outcome(line) > - when /^And:? / then @state.one_more_of_the_same(line) > + when /^#{Spec::Runner.configuration.story_template_words[:story]}: /: > + @state.story(line) > + when /^#{Spec::Runner.configuration.story_template_words[:scenario]}: /: > + @state.scenario(line) > + when /^#{Spec::Runner.configuration.story_template_words[:given]}:? /: > + @state.given(line) > + when /^#{Spec::Runner.configuration.story_template_words[:given_scenario]}:? /: > + @state.given_scenario(line) > + when /^#{Spec::Runner.configuration.story_template_words[:when]}:? /: > + @state.event(line) > + when /^#{Spec::Runner.configuration.story_template_words[:then]}:? /: > + @state.outcome(line) > + when /^#{Spec::Runner.configuration.story_template_words[:and]}:? /: > + @state.one_more_of_the_same(line) > else @state.other(line) > end > end > @@ -48,13 +55,17 @@ > > def create_story() > unless @current_story_lines.empty? > - @story_mediator.create_story(@current_story_lines[0].gsub("Story: ",""), @current_story_lines[1..-1].join("\n")) > + @story_mediator.create_story( > + @current_story_lines[0].gsub( > + "#{Spec::Runner.configuration.story_template_words[:story]}: ",""), > + @current_story_lines[1..-1].join("\n")) > @current_story_lines.clear > end > end > > def create_scenario(title) > - @story_mediator.create_scenario(title.gsub("Scenario: ","")) > + @story_mediator.create_scenario(title.gsub( > + "#{Spec::Runner.configuration.story_template_words[:scenario]}: ","")) > end > > def create_given(name) > @@ -126,8 +137,9 @@ > def remove_tag_from(tag, line) > tokens = line.split > # validation of tag can go here > - tokens[0].downcase.match(/#{tag.to_s}:?/) ? > - (tokens[1..-1].join(' ')) : line > + tokens[0].downcase.match( > + /#{Spec::Runner.configuration.story_template_words[tag].downcase}:?/) ? > + (tokens[1..-1].join(' ')) : line > end > > def eof > Index: lib/spec/example/configuration.rb > =================================================================== > --- lib/spec/example/configuration.rb (revision 7) > +++ lib/spec/example/configuration.rb (working copy) > @@ -124,7 +124,56 @@ > ) > example_group.append_after(scope, &proc) > end > + > > + # Let you write your stories in other languages. Example: > + # > + # Spec::Runner.configure do |config| > + # config.with_story_template_words({ > + # :story => "Relato", > + # :scenario => 'Escenario', > + # :given => 'Dado', > + # :given_scenario => 'DadoElEscenario', > + # :when => 'Cuando', > + # :then => 'Entonces', > + # :and => 'Y' > + # }) > + # end > + # > + # And then write your story in spanish, for example: > + # > + # Relato: La portada de Mi Sitio en La Red > + # > + # Como un usuario de La Red > + # Quiero ver la portada de Mi Sitio > + # Para ver que contenidos y servicios me ofrece > + # > + # Escenario: usuario sin sesi?n > + # Dado un usuario sin sesi?n iniciada > + # > + # Cuando visita http://www.example.com/ > + # > + # Entonces puede ver el formulario para iniciar sesi?n > + # Y el enlace para crear su cuenta > + # > + > + STORY_TEMPLATE_WORDS = { > + :story => 'Story', > + :scenario => 'Scenario', > + :given => 'Given', > + :given_scenario => 'GivenScenario', > + :when => 'When', > + :then => 'Then', > + :and => 'And' > + } > + def with_story_template_words(template_words) > + @template_words = STORY_TEMPLATE_WORDS.merge(template_words) > + end > + > + def story_template_words > + @template_words ||= STORY_TEMPLATE_WORDS > + end > + > private > > def scope_and_options(*args) > Index: lib/spec/runner/formatter/story/plain_text_formatter.rb > =================================================================== > --- lib/spec/runner/formatter/story/plain_text_formatter.rb (revision 7) > +++ lib/spec/runner/formatter/story/plain_text_formatter.rb (working copy) > @@ -21,7 +21,7 @@ > > def story_started(title, narrative) > @current_story_title = title > - @output.puts "Story: #{title}\n\n" > + @output.puts "#{Spec::Runner.configuration.story_template_words[:story]}: #{title}\n\n" > narrative.each_line do |line| > @output.print " " > @output.print line > @@ -36,7 +36,7 @@ > def scenario_started(story_title, scenario_name) > @current_scenario_name = scenario_name > @scenario_already_failed = false > - @output.print "\n\n Scenario: #{scenario_name}" > + @output.print "\n\n #{Spec::Runner.configuration.story_template_words[:scenario]}: #{scenario_name}" > @scenario_ok = true > end > > @@ -110,9 +110,9 @@ > desc_string = description.step_name > arg_regexp = description.arg_regexp > text = if(type == @previous_type) > - "\n And " > + "\n #{Spec::Runner.configuration.story_template_words[:and]} " > else > - "\n\n #{type.to_s.capitalize} " > + "\n\n #{Spec::Runner.configuration.story_template_words[type]} " > end > i = -1 > text << desc_string.gsub(arg_regexp) { |param| args[i+=1] } > > _______________________________________________ > rspec-devel mailing list > rspec-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-devel > From fernando.garcia at the-cocktail.com Sat Feb 2 07:43:48 2008 From: fernando.garcia at the-cocktail.com (fernando.garcia at the-cocktail.com) Date: 2 Feb 2008 12:43:48 -0000 Subject: [rspec-devel] =?iso-8859-1?q?Stories_in_other_languages?= Message-ID: <20080202124348.25775.qmail@ferca30.es.34web.net> Yes, of course. Here it is: http://rspec.lighthouseapp.com/projects/5645-rspec/tickets/269 Danke! Nando ----- Original Message ----- From: "David Chelimsky" To: rspec-devel Sent: Fri, 1 Feb 2008 15:40:05 -0600 Subject: Re: [rspec-devel] Stories in other languages > Would you please submit this to our tracker at http://rspec.lighthouseapp.com? > > Gracias, > David > > On Feb 1, 2008 2:43 PM, Fernando Garc?a Samblas > wrote: > > > > Hello, > > > > I've just subscribed to the RSpec lists and first of all I'd like to > > thank you all for such a great work. I'm really having a great time > > developing with RSpec. > > > > I think it would be nice for developers with non-english clients to open > > the possibility for writing RSpec Stories in other languages. > > > > Currently the story template words ("Story", "Scenario", "Given", etc.) > > are hard coded, but it shouldn't be difficult to manage them as a > > configurable hash. > > > > I don't have a good knowledge of the code behind RSpec but I've managed > > to modify 1.1.3 (r3281) code to achieve that goal. Now I can run my > > brand-new spanish stories! > > > > I send the differences with the 3281 revision attached. Before I run the > > stories I set the value of the words: > > > > Spec::Runner.configure do |config| > > config.with_story_template_words({ > > :story => "Relato", > > :scenario => 'Escenario', > > :given => 'Dado', > > :given_scenario => 'DadoElEscenario', > > :when => 'Cuando', > > :then => 'Entonces', > > :and => 'Y' > > }) > > end > > > > I'm sure it's not the best way to implement the functionality, but I > > just want to let you know the desire and a (very) simple way to get it > > (partially, I only use PlainText output) done. > > > > Thanks for listening ;) > > > > Cheers! > > Nando > > > > -- > > Fernando Garc?a Samblas > > fernando.garcia at the-cocktail.com > > > > The Cocktail > > C/ Salamanca 17 > > 28020 Madrid > > +34 91 567 06 05 > > > > > > Index: lib/spec/story/runner/story_parser.rb > > =================================================================== > > --- lib/spec/story/runner/story_parser.rb (revision 7) > > +++ lib/spec/story/runner/story_parser.rb (working copy) > > @@ -26,13 +26,20 @@ > > def process_line(line) > > line.strip! > > case line > > - when /^Story: / then @state.story(line) > > - when /^Scenario: / then @state.scenario(line) > > - when /^Given:? / then @state.given(line) > > - when /^GivenScenario:? / then @state.given_scenario(line) > > - when /^When:? / then @state.event(line) > > - when /^Then:? / then @state.outcome(line) > > - when /^And:? / then @state.one_more_of_the_same(line) > > + when /^#{Spec::Runner.configuration.story_template_words[:story]}: /: > > + @state.story(line) > > + when /^#{Spec::Runner.configuration.story_template_words[:scenario]}: /: > > + @state.scenario(line) > > + when /^#{Spec::Runner.configuration.story_template_words[:given]}:? /: > > + @state.given(line) > > + when /^#{Spec::Runner.configuration.story_template_words[:given_scenario]}:? /: > > + @state.given_scenario(line) > > + when /^#{Spec::Runner.configuration.story_template_words[:when]}:? /: > > + @state.event(line) > > + when /^#{Spec::Runner.configuration.story_template_words[:then]}:? /: > > + @state.outcome(line) > > + when /^#{Spec::Runner.configuration.story_template_words[:and]}:? /: > > + @state.one_more_of_the_same(line) > > else @state.other(line) > > end > > end > > @@ -48,13 +55,17 @@ > > > > def create_story() > > unless @current_story_lines.empty? > > - @story_mediator.create_story(@current_story_lines[0].gsub("Story: ",""), @current_story_lines[1..-1].join("\n")) > > + @story_mediator.create_story( > > + @current_story_lines[0].gsub( > > + "#{Spec::Runner.configuration.story_template_words[:story]}: ",""), > > + @current_story_lines[1..-1].join("\n")) > > @current_story_lines.clear > > end > > end > > > > def create_scenario(title) > > - @story_mediator.create_scenario(title.gsub("Scenario: ","")) > > + @story_mediator.create_scenario(title.gsub( > > + "#{Spec::Runner.configuration.story_template_words[:scenario]}: ","")) > > end > > > > def create_given(name) > > @@ -126,8 +137,9 @@ > > def remove_tag_from(tag, line) > > tokens = line.split > > # validation of tag can go here > > - tokens[0].downcase.match(/#{tag.to_s}:?/) ? > > - (tokens[1..-1].join(' ')) : line > > + tokens[0].downcase.match( > > + /#{Spec::Runner.configuration.story_template_words[tag].downcase}:?/) ? > > + (tokens[1..-1].join(' ')) : line > > end > > > > def eof > > Index: lib/spec/example/configuration.rb > > =================================================================== > > --- lib/spec/example/configuration.rb (revision 7) > > +++ lib/spec/example/configuration.rb (working copy) > > @@ -124,7 +124,56 @@ > > ) > > example_group.append_after(scope, &proc) > > end > > + > > > > + # Let you write your stories in other languages. Example: > > + # > > + # Spec::Runner.configure do |config| > > + # config.with_story_template_words({ > > + # :story => "Relato", > > + # :scenario => 'Escenario', > > + # :given => 'Dado', > > + # :given_scenario => 'DadoElEscenario', > > + # :when => 'Cuando', > > + # :then => 'Entonces', > > + # :and => 'Y' > > + # }) > > + # end > > + # > > + # And then write your story in spanish, for example: > > + # > > + # Relato: La portada de Mi Sitio en La Red > > + # > > + # Como un usuario de La Red > > + # Quiero ver la portada de Mi Sitio > > + # Para ver que contenidos y servicios me ofrece > > + # > > + # Escenario: usuario sin sesi?n > > + # Dado un usuario sin sesi?n iniciada > > + # > > + # Cuando visita http://www.example.com/ > > + # > > + # Entonces puede ver el formulario para iniciar sesi?n > > + # Y el enlace para crear su cuenta > > + # > > + > > + STORY_TEMPLATE_WORDS = { > > + :story => 'Story', > > + :scenario => 'Scenario', > > + :given => 'Given', > > + :given_scenario => 'GivenScenario', > > + :when => 'When', > > + :then => 'Then', > > + :and => 'And' > > + } > > + def with_story_template_words(template_words) > > + @template_words = STORY_TEMPLATE_WORDS.merge(template_words) > > + end > > + > > + def story_template_words > > + @template_words ||= STORY_TEMPLATE_WORDS > > + end > > + > > private > > > > def scope_and_options(*args) > > Index: lib/spec/runner/formatter/story/plain_text_formatter.rb > > =================================================================== > > --- lib/spec/runner/formatter/story/plain_text_formatter.rb (revision 7) > > +++ lib/spec/runner/formatter/story/plain_text_formatter.rb (working copy) > > @@ -21,7 +21,7 @@ > > > > def story_started(title, narrative) > > @current_story_title = title > > - @output.puts "Story: #{title}\n\n" > > + @output.puts "#{Spec::Runner.configuration.story_template_words[:story]}: #{title}\n\n" > > narrative.each_line do |line| > > @output.print " " > > @output.print line > > @@ -36,7 +36,7 @@ > > def scenario_started(story_title, scenario_name) > > @current_scenario_name = scenario_name > > @scenario_already_failed = false > > - @output.print "\n\n Scenario: #{scenario_name}" > > + @output.print "\n\n #{Spec::Runner.configuration.story_template_words[:scenario]}: #{scenario_name}" > > @scenario_ok = true > > end > > > > @@ -110,9 +110,9 @@ > > desc_string = description.step_name > > arg_regexp = description.arg_regexp > > text = if(type == @previous_type) > > - "\n And " > > + "\n #{Spec::Runner.configuration.story_template_words[:and]} " > > else > > - "\n\n #{type.to_s.capitalize} " > > + "\n\n #{Spec::Runner.configuration.story_template_words[type]} " > > end > > i = -1 > > text << desc_string.gsub(arg_regexp) { |param| args[i+=1] } > > > > _______________________________________________ > > rspec-devel mailing list > > rspec-devel at rubyforge.org > > http://rubyforge.org/mailman/listinfo/rspec-devel > > > _______________________________________________ > rspec-devel mailing list > rspec-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-devel > From bryansray at gmail.com Thu Feb 7 12:53:29 2008 From: bryansray at gmail.com (Bryan Ray) Date: Thu, 7 Feb 2008 11:53:29 -0600 Subject: [rspec-devel] Simple Question: -f specdoc Message-ID: <29a0119e0802070953g4cb1b6a3pa62e00efe86be9ef@mail.gmail.com> I've searched and searched, but I can't for the life of me find what other options can be passed in to the -f option? I currently know of "progress" and "specdoc" but I'm pretty sure there are more. Does anyone happen to have a list or know where I can go to find them? Thanks! -- Bryan Ray http://www.bryanray.net "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/rspec-devel/attachments/20080207/7b5d3bd1/attachment.html From dchelimsky at gmail.com Thu Feb 7 12:55:36 2008 From: dchelimsky at gmail.com (David Chelimsky) Date: Thu, 7 Feb 2008 11:55:36 -0600 Subject: [rspec-devel] Simple Question: -f specdoc In-Reply-To: <29a0119e0802070953g4cb1b6a3pa62e00efe86be9ef@mail.gmail.com> References: <29a0119e0802070953g4cb1b6a3pa62e00efe86be9ef@mail.gmail.com> Message-ID: <57c63afe0802070955m22a98dcj42ef39f74a9540ae@mail.gmail.com> On Feb 7, 2008 11:53 AM, Bryan Ray wrote: > I've searched and searched, but I can't for the life of me find what other > options can be passed in to the -f option? I currently know of "progress" > and "specdoc" but I'm pretty sure there are more. > > Does anyone happen to have a list or know where I can go to find them? $ spec --help > > Thanks! > > -- > Bryan Ray > http://www.bryanray.net > > "Programming today is a race between software engineers striving to build > bigger and better idiot-proof programs, and the Universe trying to produce > bigger and better idiots. So far, the Universe is winning." > _______________________________________________ > rspec-devel mailing list > rspec-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-devel > From bryansray at gmail.com Thu Feb 7 13:02:58 2008 From: bryansray at gmail.com (Bryan Ray) Date: Thu, 7 Feb 2008 12:02:58 -0600 Subject: [rspec-devel] Simple Question: -f specdoc In-Reply-To: <57c63afe0802070955m22a98dcj42ef39f74a9540ae@mail.gmail.com> References: <29a0119e0802070953g4cb1b6a3pa62e00efe86be9ef@mail.gmail.com> <57c63afe0802070955m22a98dcj42ef39f74a9540ae@mail.gmail.com> Message-ID: <29a0119e0802071002k635c2e56o322a65e9a8d57369@mail.gmail.com> Crap ... I'm an idiot ... Thanks, David. On Feb 7, 2008 11:55 AM, David Chelimsky wrote: > On Feb 7, 2008 11:53 AM, Bryan Ray wrote: > > I've searched and searched, but I can't for the life of me find what > other > > options can be passed in to the -f option? I currently know of > "progress" > > and "specdoc" but I'm pretty sure there are more. > > > > Does anyone happen to have a list or know where I can go to find them? > > $ spec --help > > > > > Thanks! > > > > -- > > Bryan Ray > > http://www.bryanray.net > > > > "Programming today is a race between software engineers striving to > build > > bigger and better idiot-proof programs, and the Universe trying to > produce > > bigger and better idiots. So far, the Universe is winning." > > _______________________________________________ > > rspec-devel mailing list > > rspec-devel at rubyforge.org > > http://rubyforge.org/mailman/listinfo/rspec-devel > > > _______________________________________________ > rspec-devel mailing list > rspec-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-devel > -- Bryan Ray http://www.bryanray.net "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/rspec-devel/attachments/20080207/46dcf4b5/attachment.html From dchelimsky at gmail.com Thu Feb 7 13:32:54 2008 From: dchelimsky at gmail.com (David Chelimsky) Date: Thu, 7 Feb 2008 12:32:54 -0600 Subject: [rspec-devel] Simple Question: -f specdoc In-Reply-To: <29a0119e0802071002k635c2e56o322a65e9a8d57369@mail.gmail.com> References: <29a0119e0802070953g4cb1b6a3pa62e00efe86be9ef@mail.gmail.com> <57c63afe0802070955m22a98dcj42ef39f74a9540ae@mail.gmail.com> <29a0119e0802071002k635c2e56o322a65e9a8d57369@mail.gmail.com> Message-ID: <57c63afe0802071032x1c9f97bcx28cd551de803363c@mail.gmail.com> On Feb 7, 2008 12:02 PM, Bryan Ray wrote: > Crap ... I'm an idiot ... Nah. Idiots do things like `rm -rf /` - this hardly qualifies. > > Thanks, David. > > > > On Feb 7, 2008 11:55 AM, David Chelimsky wrote: > > > > On Feb 7, 2008 11:53 AM, Bryan Ray wrote: > > > I've searched and searched, but I can't for the life of me find what > other > > > options can be passed in to the -f option? I currently know of > "progress" > > > and "specdoc" but I'm pretty sure there are more. > > > > > > Does anyone happen to have a list or know where I can go to find them? > > > > $ spec --help > > > > > > > > > > Thanks! > > > > > > -- > > > Bryan Ray > > > http://www.bryanray.net > > > > > > "Programming today is a race between software engineers striving to > build > > > bigger and better idiot-proof programs, and the Universe trying to > produce > > > bigger and better idiots. So far, the Universe is winning." > > > _______________________________________________ > > > rspec-devel mailing list > > > rspec-devel at rubyforge.org > > > http://rubyforge.org/mailman/listinfo/rspec-devel > > > > > _______________________________________________ > > rspec-devel mailing list > > rspec-devel at rubyforge.org > > http://rubyforge.org/mailman/listinfo/rspec-devel > > > > > > -- > > > Bryan Ray > http://www.bryanray.net > > "Programming today is a race between software engineers striving to build > bigger and better idiot-proof programs, and the Universe trying to produce > bigger and better idiots. So far, the Universe is winning." > _______________________________________________ > rspec-devel mailing list > rspec-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-devel > From cgrindel at yahoo.com Fri Feb 8 14:30:56 2008 From: cgrindel at yahoo.com (Charles Grindel) Date: Fri, 8 Feb 2008 11:30:56 -0800 (PST) Subject: [rspec-devel] Solution for 'Shared examples not reloading in spec_server' Message-ID: <20868.5092.qm@web54102.mail.re2.yahoo.com> I posted this in the users mailing list yesterday. I investigated a bit more and found what I believe is the problem. The location below provides the code and a brief explanation of what I found. Note, I am running my tests in spec_server. http://pastie.caboo.se/149398 The add_shared_example_group method in SharedExampleGroup calls the guard_against_redefining_existing_example_group method expecting it to raise an error if it should not proceed with the add of the new example group. When I would change a file that contained shared example groups, the guard method never raised an error and the redefined example groups were added to the end of the list. However, when a shared example group is included in another example group, the find method that looks for the shared example group starts looking from the beginning of the list and would always find the original version of the example. Since I want the new version of the example group to replace the old version, I changed the guard_against_redefining_existing_example_group method to remove any existing example group from the list if they have the same description. Is there a reason why we wouldn't want to replace shared example groups if they are already defined? Thanks, Chuck ----- Forwarded Message ---- From: Charles Grindel To: rspec-users at rubyforge.org Sent: Thursday, February 7, 2008 10:39:15 AM Subject: Shared examples not reloading in spec_server I am currently running RSpec 1.1.3 with ZenTest 3.9.1 on Windows XP. I have noticed that shared examples are not being reloaded by spec_server when they have been updated. Below is a simple example that reproduces the problem. The example code and output is at the location below. http://pastie.caboo.se/148688 I have confirmed that non-shared examples are being reloaded by spec_server. So, here are my questions. 1. Has anyone else noticed this behavior? 2. Does anyone know how I can force spec_server to reload the shared examples? 3. If this smells like a bug, can someone point me to instructions for filing a bug? Thanks, Chuck -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/rspec-devel/attachments/20080208/08e5b093/attachment-0001.html From address4spams at 21croissants.com Tue Feb 12 12:35:57 2008 From: address4spams at 21croissants.com (21croissants) Date: Tue, 12 Feb 2008 09:35:57 -0800 (PST) Subject: [rspec-devel] RSpec 1.1.3 + ZenTest 3.9.1 + Rails 1.2.6 do NOT ignore folders ^vendor/* Message-ID: <15437766.post@talk.nabble.com> 21croissants wrote: Hi, I just updated to the latest RSpec 1.1.3 + ZenTest 3.9.1. I also have rspec 1.1.3 installed as a gem When starting autotest with -v option, there is a lot of noise because autotest does not ignore the vendor folder, the migrations, etc ...: Dunno! vendor/plugins/acts_as_solr/solr/lib/jetty-util-6.1.3.jar Dunno! vendor/rails/activerecord/lib/active_record/associations/has_many_through_association.rb Dunno! vendor/rails/actionpack/lib/action_view.rb Dunno! vendor/plugins/active_scaffold/test/extensions/array.rb Dunno! vendor/plugins/active_scaffold/lib/extensions/nil_id_in_url_params.rb Dunno! config/amazon_s3.yml Dunno! vendor/rails/actionpack/lib/action_controller/base.rb Dunno! vendor/plugins/acts_as_solr/lib/solr/response/base.rb Dunno! vendor/plugins/rake_tasks/init.rb Dunno! public/images/linqia/icon_groupmember.gif Dunno! vendor/plugins/acts_as_solr/test/db/test.db Dunno! vendor/rails/actionpack/lib/action_controller/mime_type.rb Dunno! public/stylesheets/themes/default/close.gif Dunno! db/migrate/021_create_community_bookmarks.rb Dunno! vendor/plugins/cache_fu/test/local_cache_test.rb Dunno! public/images/icons/flags/bv.gif in the output. Am I the only one? After reading the code in rspec_on_rails/lib/autotest/rails_rspec.rb Autotest.add_hook :initialize do |at| %w{^config/ ^coverage/ ^db/ ^doc/ ^log/ ^public/ ^script ^vendor/rails ^vendor/plugins previous_failures.txt}.each do |exception| at.add_exception(exception) end I think the noise is not normal. Maybe I should write some specs to verify this code is working ;-) As David C. explained in his blog, I also have a .autotest in my HOME: Autotest.add_hook :initialize do |at| %w{.svn .hg .git .rhtml .png .txt .sh .project .rjs .rake .jpg .xml .xlst }.each {|exception|at.add_exception(exception)} end Jean-Michel I have found the solution to my problem: I had to patch rspec_on_rails. See patch attached rspec_on_rails_autotest_hook_exceptions_so_autotest_ignore_rails_folders.diff http://www.nabble.com/file/p15437766/rspec_on_rails_autotest_hook_exceptions_so_autotest_ignore_rails_folders.diff rspec_on_rails_autotest_hook_exceptions_so_autotest_ignore_rails_folders.diff Any question, reply to this list or contact me at http://21croissants.com/contact I am now writing some specs to describe the problem and ... my solution (patch) -- View this message in context: http://www.nabble.com/RSpec-1.1.3-%2B-ZenTest-3.9.1-%2B-Rails-1.2.6-do-NOT-ignore-folders-%5Evendor-*-tp15437766p15437766.html Sent from the rspec-devel mailing list archive at Nabble.com. From technoweenie at gmail.com Thu Feb 14 02:11:57 2008 From: technoweenie at gmail.com (Rick Olson) Date: Wed, 13 Feb 2008 23:11:57 -0800 Subject: [rspec-devel] rspec_on_rails fix for edge rails 8862 Message-ID: <48fe25b0802132311m407df1b8q42c398f06e2fe620@mail.gmail.com> I don't know what the history of this 'deprecated_status' argument in rspec_on_rails' render method, but it breaks on edge rails 8862+ http://dev.rubyonrails.org/changeset/8862 curl http://pastie.org/152009.txt | patch -p1 -- Rick Olson From bryansray at gmail.com Thu Feb 14 08:24:36 2008 From: bryansray at gmail.com (Bryan Ray) Date: Thu, 14 Feb 2008 07:24:36 -0600 Subject: [rspec-devel] rspec_on_rails fix for edge rails 8862 In-Reply-To: <48fe25b0802132311m407df1b8q42c398f06e2fe620@mail.gmail.com> References: <48fe25b0802132311m407df1b8q42c398f06e2fe620@mail.gmail.com> Message-ID: <29a0119e0802140524w381cf132u5de3b7077e09f6f3@mail.gmail.com> Yeah. I'm having this problem too. I'm not sure whether it's a Rails issue or a rSpec issue at this point though and I'm too new to Rails / rSpec to be able to dig in to the problem. :( Would love to hear more about why it's breaking though. On Thu, Feb 14, 2008 at 1:11 AM, Rick Olson wrote: > I don't know what the history of this 'deprecated_status' argument in > rspec_on_rails' render method, but it breaks on edge rails 8862+ > > http://dev.rubyonrails.org/changeset/8862 > > curl http://pastie.org/152009.txt | patch -p1 > > -- > Rick Olson > _______________________________________________ > rspec-devel mailing list > rspec-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-devel > -- Bryan Ray http://www.bryanray.net "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/rspec-devel/attachments/20080214/62995ac5/attachment.html From dchelimsky at gmail.com Thu Feb 14 09:31:16 2008 From: dchelimsky at gmail.com (David Chelimsky) Date: Thu, 14 Feb 2008 09:31:16 -0500 Subject: [rspec-devel] rspec_on_rails fix for edge rails 8862 In-Reply-To: <29a0119e0802140524w381cf132u5de3b7077e09f6f3@mail.gmail.com> References: <48fe25b0802132311m407df1b8q42c398f06e2fe620@mail.gmail.com> <29a0119e0802140524w381cf132u5de3b7077e09f6f3@mail.gmail.com> Message-ID: <57c63afe0802140631u6900db7cr5e561378e058363b@mail.gmail.com> On Thu, Feb 14, 2008 at 8:24 AM, Bryan Ray wrote: > Yeah. I'm having this problem too. > > I'm not sure whether it's a Rails issue or a rSpec issue at this point > though and I'm too new to Rails / rSpec to be able to dig in to the problem. > :( > > Would love to hear more about why it's breaking though. It's simple. Rails made a backwards compatibility breaking change. Unfortunately, while Rick's patch works for Rails 2.0.x and edge, it doesn't work for 1.2.x, which RSpec supports. I won't have time to address this for a day or two, so if someone wants to do up a patch that passes the pre_commit, that would be great. > On Thu, Feb 14, 2008 at 1:11 AM, Rick Olson wrote: > > I don't know what the history of this 'deprecated_status' argument in > > rspec_on_rails' render method, but it breaks on edge rails 8862+ > > > > http://dev.rubyonrails.org/changeset/8862 > > > > curl http://pastie.org/152009.txt | patch -p1 > > > > -- > > Rick Olson > > _______________________________________________ > > rspec-devel mailing list > > rspec-devel at rubyforge.org > > http://rubyforge.org/mailman/listinfo/rspec-devel > > > > > > -- > Bryan Ray > http://www.bryanray.net > > "Programming today is a race between software engineers striving to build > bigger and better idiot-proof programs, and the Universe trying to produce > bigger and better idiots. So far, the Universe is winning." > _______________________________________________ > rspec-devel mailing list > rspec-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-devel > From technoweenie at gmail.com Thu Feb 14 15:34:38 2008 From: technoweenie at gmail.com (Rick Olson) Date: Thu, 14 Feb 2008 12:34:38 -0800 Subject: [rspec-devel] rspec_on_rails fix for edge rails 8862 In-Reply-To: <57c63afe0802140631u6900db7cr5e561378e058363b@mail.gmail.com> References: <48fe25b0802132311m407df1b8q42c398f06e2fe620@mail.gmail.com> <29a0119e0802140524w381cf132u5de3b7077e09f6f3@mail.gmail.com> <57c63afe0802140631u6900db7cr5e561378e058363b@mail.gmail.com> Message-ID: <48fe25b0802141234l66ba8ecescc670c31f915fdf8@mail.gmail.com> > It's simple. Rails made a backwards compatibility breaking change. Well, the status argument was deprecated *before* rails 1.0 and removed completely in Rails 2.0. -- Rick Olson http://lighthouseapp.com http://weblog.techno-weenie.net http://mephistoblog.com From dchelimsky at gmail.com Fri Feb 15 00:27:49 2008 From: dchelimsky at gmail.com (David Chelimsky) Date: Fri, 15 Feb 2008 00:27:49 -0500 Subject: [rspec-devel] rspec_on_rails fix for edge rails 8862 In-Reply-To: <48fe25b0802141234l66ba8ecescc670c31f915fdf8@mail.gmail.com> References: <48fe25b0802132311m407df1b8q42c398f06e2fe620@mail.gmail.com> <29a0119e0802140524w381cf132u5de3b7077e09f6f3@mail.gmail.com> <57c63afe0802140631u6900db7cr5e561378e058363b@mail.gmail.com> <48fe25b0802141234l66ba8ecescc670c31f915fdf8@mail.gmail.com> Message-ID: <57c63afe0802142127w5e1e8454te90f9f7b84c92db9@mail.gmail.com> On Thu, Feb 14, 2008 at 3:34 PM, Rick Olson wrote: > > It's simple. Rails made a backwards compatibility breaking change. > > Well, the status argument was deprecated *before* rails 1.0 and > removed completely in Rails 2.0. Agreed. It's tricky. For a normal consumer of Rails that's just fine. For anything that monkey patches rails because there isn't a logical extension point for what it wants to do (like rspec_on_rails) it's a different situation. I wasn't making a criticism, just an observation. The change did break backwards compatibility. RSpec can't now support both rails 1.x and 2.x without code that accounts for the different versions. FWIW, David > > -- > Rick Olson > http://lighthouseapp.com > http://weblog.techno-weenie.net > http://mephistoblog.com > > > _______________________________________________ > rspec-devel mailing list > rspec-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-devel > From dchelimsky at gmail.com Fri Feb 15 01:34:34 2008 From: dchelimsky at gmail.com (David Chelimsky) Date: Fri, 15 Feb 2008 01:34:34 -0500 Subject: [rspec-devel] rspec_on_rails fix for edge rails 8862 In-Reply-To: <48fe25b0802132311m407df1b8q42c398f06e2fe620@mail.gmail.com> References: <48fe25b0802132311m407df1b8q42c398f06e2fe620@mail.gmail.com> Message-ID: <57c63afe0802142234l23627360rde9192fb902e3862@mail.gmail.com> On Thu, Feb 14, 2008 at 2:11 AM, Rick Olson wrote: > I don't know what the history of this 'deprecated_status' argument in > rspec_on_rails' render method, but it breaks on edge rails 8862+ > > http://dev.rubyonrails.org/changeset/8862 > > curl http://pastie.org/152009.txt | patch -p1 Thanks for the patch Rick - I applied it (modified to support Rails 1.x and 2.x) to r3309. Cheers, David > > -- > Rick Olson > _______________________________________________ > rspec-devel mailing list > rspec-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-devel > From brian.takita at gmail.com Fri Feb 15 18:00:16 2008 From: brian.takita at gmail.com (Brian Takita) Date: Fri, 15 Feb 2008 15:00:16 -0800 Subject: [rspec-devel] My Performance Message-ID: <1d7ddd110802151500w716e0f96i14cbaf4091b0e181@mail.gmail.com> Hey Pat, I'm sorry about the late notice, but my performance will be at the Fort Mason center (Building D on the second floor) at 8 pm tomorrow. http://maps.google.com/maps?ie=UTF-8&oe=utf-8&client=firefox-a&dq=fort+mason+loc:+San+Francisco,+CA&daddr=Bldg-D+Fort+Mason,+San+Francisco,+CA+94123&geocode=5087309186523237744,37.805310,-122.427680&ll=37.805310,-122.427680&iwstate1=dir:to&iwloc=A&f=d The company is "Pan Theater". I think the shows are $10. Come if you like (it would be awesome to have you). No worries otherwise. Brian From brian.takita at gmail.com Fri Feb 15 18:00:30 2008 From: brian.takita at gmail.com (Brian Takita) Date: Fri, 15 Feb 2008 15:00:30 -0800 Subject: [rspec-devel] My Performance In-Reply-To: <1d7ddd110802151500w716e0f96i14cbaf4091b0e181@mail.gmail.com> References: <1d7ddd110802151500w716e0f96i14cbaf4091b0e181@mail.gmail.com> Message-ID: <1d7ddd110802151500w62b48588i150f2ba7b92779e3@mail.gmail.com> oops On Fri, Feb 15, 2008 at 3:00 PM, Brian Takita wrote: > Hey Pat, I'm sorry about the late notice, but my performance will be > at the Fort Mason center (Building D on the second floor) at 8 pm > tomorrow. > > http://maps.google.com/maps?ie=UTF-8&oe=utf-8&client=firefox-a&dq=fort+mason+loc:+San+Francisco,+CA&daddr=Bldg-D+Fort+Mason,+San+Francisco,+CA+94123&geocode=5087309186523237744,37.805310,-122.427680&ll=37.805310,-122.427680&iwstate1=dir:to&iwloc=A&f=d > > The company is "Pan Theater". I think the shows are $10. Come if you > like (it would be awesome to have you). No worries otherwise. > > Brian > From nratani at gmail.com Sat Feb 16 21:59:28 2008 From: nratani at gmail.com (Nadim Ratani) Date: Sat, 16 Feb 2008 19:59:28 -0700 Subject: [rspec-devel] rspec_ui selenium example error Message-ID: I'm following the tutorial here: http://texagon.blogspot.com/2007/06/lets-play-selenium-part-one.html When I run "rake spec:selenium --trace" on the spec selenium example I get the following error output: ** Invoke spec:selenium (first_time) ** Execute spec:selenium /usr/lib/ruby/gems/1.8/gems/spec_ui-0.2.4/lib/spec/ui/formatter.rb:6: uninitialized constant Spec::Runner::Formatter (NameError) from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' from /usr/lib/ruby/gems/1.8/gems/spec_ui-0.2.4/lib/spec/ui.rb:1 from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:32:in `gem_original_require' from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:32:in `require' from /usr/lib/ruby/gems/1.8/gems/rspec-1.1.3/lib/spec/runner/option_parser.rb:137:in `invoke_requires' from /usr/lib/ruby/gems/1.8/gems/rspec-1.1.3/lib/spec/runner/option_parser.rb:136:in `each' from /usr/lib/ruby/gems/1.8/gems/rspec-1.1.3/lib/spec/runner/option_parser.rb:136:in `invoke_requires' from /usr/lib/ruby/gems/1.8/gems/rspec-1.1.3/lib/spec/runner/option_parser.rb:102:in `initialize' from /usr/lib/ruby/1.8/optparse.rb:1260:in `call' from /usr/lib/ruby/1.8/optparse.rb:1260:in `parse_in_order' from /usr/lib/ruby/1.8/optparse.rb:1247:in `catch' from /usr/lib/ruby/1.8/optparse.rb:1247:in `parse_in_order' from /usr/lib/ruby/1.8/optparse.rb:1241:in `order!' from /usr/lib/ruby/gems/1.8/gems/rspec-1.1.3/lib/spec/runner/option_parser.rb:126:in `order!' from /usr/lib/ruby/gems/1.8/gems/rspec-1.1.3/lib/spec/extensions/main.rb:89:in `rspec_options' from /usr/lib/ruby/gems/1.8/gems/rspec-1.1.3/bin/spec:4 rake aborted! Command ruby -I"../../lib" "/usr/lib/ruby/gems/1.8/gems/rspec-1.1.3/bin/spec" "spec/selenium/find_rspecs_homepage_spec.rb" --color --diff --require rubygems,spec/ui --format Spec::Ui::ScreenshotFormatter:spec_report.html --format progress failed /usr/lib/ruby/gems/1.8/gems/rspec-1.1.3/lib/spec/rake/spectask.rb:184:in `define' /usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1003:in `verbose' /usr/lib/ruby/gems/1.8/gems/rspec-1.1.3/lib/spec/rake/spectask.rb:153:in `define' /usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:546:in `call' /usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:546:in `execute' /usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:541:in `each' /usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:541:in `execute' /usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:508:in `invoke_with_call_chain' /usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:501:in `synchronize' /usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:501:in `invoke_with_call_chain' /usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:494:in `invoke' /usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1931:in `invoke_task' /usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1909:in `top_level' /usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1909:in `each' /usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1909:in `top_level' /usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1948:in `standard_exception_handling' /usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1903:in `top_level' /usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1881:in `run' /usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1948:in `standard_exception_handling' /usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1878:in `run' /usr/lib/ruby/gems/1.8/gems/rake-0.8.1/bin/rake:31 /usr/bin/rake:19:in `load' /usr/bin/rake:19 Any suggestions? NR -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/rspec-devel/attachments/20080216/51bcb912/attachment-0001.html From undees at gmail.com Sun Feb 17 15:17:14 2008 From: undees at gmail.com (Ian Dees) Date: Sun, 17 Feb 2008 12:17:14 -0800 Subject: [rspec-devel] rspec-devel Digest, Vol 23, Issue 3 In-Reply-To: References: Message-ID: Hi, all. Quoth Nadim: > When I run "rake spec:selenium --trace" on the spec selenium example I get the following error output: > ** Invoke spec:selenium (first_time) > ** Execute spec:selenium > /usr/lib/ruby/gems/1.8/gems/spec_ui-0.2.4/lib/spec/ui/formatter.rb:6: uninitialized constant Spec::Runner::Formatter (NameError) I'm the author of that tutorial. RSpec has changed quite a bit since then, and the Spec::Ui gem needs to be brought up to date. Let me take a crack at it this weekend and see if I can get a patch to Dave. (Dave, do you want this filed in Lighthouse or the rspec-ext trackers in RubyForge?) --Ian From dchelimsky at gmail.com Sun Feb 17 15:28:42 2008 From: dchelimsky at gmail.com (David Chelimsky) Date: Sun, 17 Feb 2008 15:28:42 -0500 Subject: [rspec-devel] rspec-devel Digest, Vol 23, Issue 3 In-Reply-To: References: Message-ID: <57c63afe0802171228k2dd35e25h4f5c2de62f0e9a0@mail.gmail.com> On Feb 17, 2008 3:17 PM, Ian Dees wrote: > Hi, all. > > Quoth Nadim: > > > When I run "rake spec:selenium --trace" on the spec selenium example I get the following error output: > > ** Invoke spec:selenium (first_time) > > ** Execute spec:selenium > > /usr/lib/ruby/gems/1.8/gems/spec_ui-0.2.4/lib/spec/ui/formatter.rb:6: uninitialized constant Spec::Runner::Formatter (NameError) > > I'm the author of that tutorial. RSpec has changed quite a bit since > then, and the Spec::Ui gem needs to be brought up to date. Let me > take a crack at it this weekend and see if I can get a patch to Dave. > > (Dave, do you want this filed in Lighthouse or the rspec-ext trackers > in RubyForge?) Hey Ian - Aslak is maintaining spec-ui at rspec-exts. Please go ahead and submit the patch there. Thanks, David > > --Ian > _______________________________________________ > rspec-devel mailing list > rspec-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-devel > From undees at gmail.com Mon Feb 18 04:00:56 2008 From: undees at gmail.com (Ian Dees) Date: Mon, 18 Feb 2008 01:00:56 -0800 Subject: [rspec-devel] rspec_ui selenium example error Message-ID: Hi, all. Dave, thanks for the advice. I've posted the patch on rspec-ext's RubyForge tracker (might be nice to have them on Lighthouse at some point). Nadim, I don't know whether or not my patch is going to pass muster as is, or is going to need changes before (if?) the Spec::Ui project accepts it. But if you'd like to try it out in the meantime: First, there's a Ruby gem now that includes both the Selenium Ruby bindings and the server jar. So, in one console, you'd do this: sudo gem install Selenium # notice the capital S selenium # notice the lower-case s Then, in another console: svn co http://rspec-ext.rubyforge.org/svn/ui/trunk spec_ui cd spec_ui wget http://rubyforge.org/tracker/download.php/3091/11941/18156/3378/rspec113.diff patch -p0 < rspec113.diff cd examples/selenium rake spec:selenium Hope this gets you going -- please drop me a line if there's anything I can do. Sincerely, Ian From brian.takita at gmail.com Fri Feb 22 16:24:13 2008 From: brian.takita at gmail.com (Brian Takita) Date: Fri, 22 Feb 2008 13:24:13 -0800 Subject: [rspec-devel] Simple Question: -f specdoc In-Reply-To: <57c63afe0802071032x1c9f97bcx28cd551de803363c@mail.gmail.com> References: <29a0119e0802070953g4cb1b6a3pa62e00efe86be9ef@mail.gmail.com> <57c63afe0802070955m22a98dcj42ef39f74a9540ae@mail.gmail.com> <29a0119e0802071002k635c2e56o322a65e9a8d57369@mail.gmail.com> <57c63afe0802071032x1c9f97bcx28cd551de803363c@mail.gmail.com> Message-ID: <1d7ddd110802221324s5e04dcc6mc8b817af8b695960@mail.gmail.com> On Thu, Feb 7, 2008 at 10:32 AM, David Chelimsky wrote: > On Feb 7, 2008 12:02 PM, Bryan Ray wrote: > > Crap ... I'm an idiot ... > > Nah. Idiots do things like `rm -rf /` - this hardly qualifies. # or @basedir = nil @file = nil `rm -rf #{@basedir}/#{@file}` > > > > > > > Thanks, David. > > > > > > > > On Feb 7, 2008 11:55 AM, David Chelimsky wrote: > > > > > > On Feb 7, 2008 11:53 AM, Bryan Ray wrote: > > > > I've searched and searched, but I can't for the life of me find what > > other > > > > options can be passed in to the -f option? I currently know of > > "progress" > > > > and "specdoc" but I'm pretty sure there are more. > > > > > > > > Does anyone happen to have a list or know where I can go to find them? > > > > > > $ spec --help > > > > > > > > > > > > > > Thanks! > > > > > > > > -- > > > > Bryan Ray > > > > http://www.bryanray.net > > > > > > > > "Programming today is a race between software engineers striving to > > build > > > > bigger and better idiot-proof programs, and the Universe trying to > > produce > > > > bigger and better idiots. So far, the Universe is winning." > > > > _______________________________________________ > > > > rspec-devel mailing list > > > > rspec-devel at rubyforge.org > > > > http://rubyforge.org/mailman/listinfo/rspec-devel > > > > > > > _______________________________________________ > > > rspec-devel mailing list > > > rspec-devel at rubyforge.org > > > http://rubyforge.org/mailman/listinfo/rspec-devel > > > > > > > > > > > -- > > > > > > Bryan Ray > > http://www.bryanray.net > > > > "Programming today is a race between software engineers striving to build > > bigger and better idiot-proof programs, and the Universe trying to produce > > bigger and better idiots. So far, the Universe is winning." > > _______________________________________________ > > rspec-devel mailing list > > rspec-devel at rubyforge.org > > http://rubyforge.org/mailman/listinfo/rspec-devel > > > _______________________________________________ > rspec-devel mailing list > rspec-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-devel > From dchelimsky at gmail.com Fri Feb 22 16:25:53 2008 From: dchelimsky at gmail.com (David Chelimsky) Date: Fri, 22 Feb 2008 15:25:53 -0600 Subject: [rspec-devel] Simple Question: -f specdoc In-Reply-To: <1d7ddd110802221324s5e04dcc6mc8b817af8b695960@mail.gmail.com> References: <29a0119e0802070953g4cb1b6a3pa62e00efe86be9ef@mail.gmail.com> <57c63afe0802070955m22a98dcj42ef39f74a9540ae@mail.gmail.com> <29a0119e0802071002k635c2e56o322a65e9a8d57369@mail.gmail.com> <57c63afe0802071032x1c9f97bcx28cd551de803363c@mail.gmail.com> <1d7ddd110802221324s5e04dcc6mc8b817af8b695960@mail.gmail.com> Message-ID: <57c63afe0802221325q4d7f0a03i4bdae8199a570229@mail.gmail.com> On Fri, Feb 22, 2008 at 3:24 PM, Brian Takita wrote: > On Thu, Feb 7, 2008 at 10:32 AM, David Chelimsky wrote: > > On Feb 7, 2008 12:02 PM, Bryan Ray wrote: > > > Crap ... I'm an idiot ... > > > > Nah. Idiots do things like `rm -rf /` - this hardly qualifies. > # or > @basedir = nil > @file = nil > `rm -rf #{@basedir}/#{@file}` Please tell me you didn't find that in rspec. Please. > > > > > > > > > > > > > > Thanks, David. > > > > > > > > > > > > On Feb 7, 2008 11:55 AM, David Chelimsky wrote: > > > > > > > > On Feb 7, 2008 11:53 AM, Bryan Ray wrote: > > > > > I've searched and searched, but I can't for the life of me find what > > > other > > > > > options can be passed in to the -f option? I currently know of > > > "progress" > > > > > and "specdoc" but I'm pretty sure there are more. > > > > > > > > > > Does anyone happen to have a list or know where I can go to find them? > > > > > > > > $ spec --help > > > > > > > > > > > > > > > > > > Thanks! > > > > > > > > > > -- > > > > > Bryan Ray > > > > > http://www.bryanray.net > > > > > > > > > > "Programming today is a race between software engineers striving to > > > build > > > > > bigger and better idiot-proof programs, and the Universe trying to > > > produce > > > > > bigger and better idiots. So far, the Universe is winning." > > > > > _______________________________________________ > > > > > rspec-devel mailing list > > > > > rspec-devel at rubyforge.org > > > > > http://rubyforge.org/mailman/listinfo/rspec-devel > > > > > > > > > _______________________________________________ > > > > rspec-devel mailing list > > > > rspec-devel at rubyforge.org > > > > http://rubyforge.org/mailman/listinfo/rspec-devel > > > > > > > > > > > > > > > > -- > > > > > > > > > Bryan Ray > > > http://www.bryanray.net > > > > > > "Programming today is a race between software engineers striving to build > > > bigger and better idiot-proof programs, and the Universe trying to produce > > > bigger and better idiots. So far, the Universe is winning." > > > _______________________________________________ > > > rspec-devel mailing list > > > rspec-devel at rubyforge.org > > > http://rubyforge.org/mailman/listinfo/rspec-devel > > > > > _______________________________________________ > > rspec-devel mailing list > > rspec-devel at rubyforge.org > > http://rubyforge.org/mailman/listinfo/rspec-devel > > > _______________________________________________ > rspec-devel mailing list > rspec-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-devel > From brian.takita at gmail.com Sat Feb 23 18:47:45 2008 From: brian.takita at gmail.com (Brian Takita) Date: Sat, 23 Feb 2008 15:47:45 -0800 Subject: [rspec-devel] Simple Question: -f specdoc In-Reply-To: <57c63afe0802221325q4d7f0a03i4bdae8199a570229@mail.gmail.com> References: <29a0119e0802070953g4cb1b6a3pa62e00efe86be9ef@mail.gmail.com> <57c63afe0802070955m22a98dcj42ef39f74a9540ae@mail.gmail.com> <29a0119e0802071002k635c2e56o322a65e9a8d57369@mail.gmail.com> <57c63afe0802071032x1c9f97bcx28cd551de803363c@mail.gmail.com> <1d7ddd110802221324s5e04dcc6mc8b817af8b695960@mail.gmail.com> <57c63afe0802221325q4d7f0a03i4bdae8199a570229@mail.gmail.com> Message-ID: <1d7ddd110802231547u34d0cc43r136ae6ea31888277@mail.gmail.com> On Fri, Feb 22, 2008 at 1:25 PM, David Chelimsky wrote: > On Fri, Feb 22, 2008 at 3:24 PM, Brian Takita wrote: > > On Thu, Feb 7, 2008 at 10:32 AM, David Chelimsky wrote: > > > On Feb 7, 2008 12:02 PM, Bryan Ray wrote: > > > > Crap ... I'm an idiot ... > > > > > > Nah. Idiots do things like `rm -rf /` - this hardly qualifies. > > # or > > @basedir = nil > > @file = nil > > `rm -rf #{@basedir}/#{@file}` > > Please tell me you didn't find that in rspec. Please. No. I did a version of this a while ago. There was a typo in the instance variable. It was quite exciting to see all of those permission denied errors flying by, and then having the machine not work properly until the OS was reinstalled. > > > > > > > > > > > > > > > > > > > > > > > > Thanks, David. > > > > > > > > > > > > > > > > On Feb 7, 2008 11:55 AM, David Chelimsky wrote: > > > > > > > > > > On Feb 7, 2008 11:53 AM, Bryan Ray wrote: > > > > > > I've searched and searched, but I can't for the life of me find what > > > > other > > > > > > options can be passed in to the -f option? I currently know of > > > > "progress" > > > > > > and "specdoc" but I'm pretty sure there are more. > > > > > > > > > > > > Does anyone happen to have a list or know where I can go to find them? > > > > > > > > > > $ spec --help > > > > > > > > > > > > > > > > > > > > > > Thanks! > > > > > > > > > > > > -- > > > > > > Bryan Ray > > > > > > http://www.bryanray.net > > > > > > > > > > > > "Programming today is a race between software engineers striving to > > > > build > > > > > > bigger and better idiot-proof programs, and the Universe trying to > > > > produce > > > > > > bigger and better idiots. So far, the Universe is winning." > > > > > > _______________________________________________ > > > > > > rspec-devel mailing list > > > > > > rspec-devel at rubyforge.org > > > > > > http://rubyforge.org/mailman/listinfo/rspec-devel > > > > > > > > > > > _______________________________________________ > > > > > rspec-devel mailing list > > > > > rspec-devel at rubyforge.org > > > > > http://rubyforge.org/mailman/listinfo/rspec-devel > > > > > > > > > > > > > > > > > > > > > -- > > > > > > > > > > > > Bryan Ray > > > > http://www.bryanray.net > > > > > > > > "Programming today is a race between software engineers striving to build > > > > bigger and better idiot-proof programs, and the Universe trying to produce > > > > bigger and better idiots. So far, the Universe is winning." > > > > _______________________________________________ > > > > rspec-devel mailing list > > > > rspec-devel at rubyforge.org > > > > http://rubyforge.org/mailman/listinfo/rspec-devel > > > > > > > _______________________________________________ > > > rspec-devel mailing list > > > rspec-devel at rubyforge.org > > > http://rubyforge.org/mailman/listinfo/rspec-devel > > > > > _______________________________________________ > > rspec-devel mailing list > > rspec-devel at rubyforge.org > > http://rubyforge.org/mailman/listinfo/rspec-devel > > > _______________________________________________ > rspec-devel mailing list > rspec-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-devel > From webs.dev at gmail.com Tue Feb 26 07:56:08 2008 From: webs.dev at gmail.com (greg weber) Date: Tue, 26 Feb 2008 06:56:08 -0600 Subject: [rspec-devel] [ANN] quicktest - an RSpec wrapper for in-lining tests Message-ID: == ABOUT Quicktest is a utility for inlining ruby unit tests with the ruby code under test The typical test driven development workflow requires constant switching between the file containg the source code and the the file containg the tests. When creating code, it can be more convenient to place tests immediately after the code you are writing. After the code has been written, it may be a good idea to move it to another file, but the option to permanently keep tests with the source is available (useful for scripts). Quicktest is designed to support quick tests in a framework agnostic way. Currently, only an rspec testrunner is available, but it is trivial to write one for another testing framework. == FEATURES Quicktest uses method tracing to know the method you are testing. By default the output of a failed test will show the object and method name. == USAGE To test a method, place another method called 'quicktest' immediately after it the quicktest method has three OPTIONAL arguments - the test runner object - a reference to self - a method object for the method under test run with spec -r quicktest file_to_test There is a convenience script so that you can just run quickspec file_to_test == NOTES - leaving test code in with your production code is not necessarily a good idea, but there is almost no runtime overhead to doing so since ruby will not evaluate code in a method until the method is invoked - quicktest instance methods not working properly? if the class (or one of its ancestors) is overriding method tracing than including QuickTest::Tracer will fix it. example: run with bin/quickspec class Foo attr_reader :bar def initialize @bar = true end def quicktest t, s t.it "bar should be initialized to true" do s.bar.should == true end end def self.hello arg "hello" + arg end def self.quicktest t, s, meth t.it "should prepend 'hello' to its argument" do meth["world"].should == 'hello world' # error - no space 'helloworld' end end end Running quicktest on the above outputs the following: .F 1) 'Foo hello should prepend 'hello' to its argument' FAILED expected: "hello world", got: "helloworld" (using ==) ./README:22:in `quicktest' /home/greg/quicktest/lib/quicktest.rb:65:in `instance_eval' /home/greg/quicktest/lib/quicktest.rb:65:in `run_tests' Finished in 0.008338 seconds 2 examples, 1 failure -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/rspec-devel/attachments/20080226/a36a553c/attachment.html From bryansray at gmail.com Tue Feb 26 14:26:30 2008 From: bryansray at gmail.com (Bryan Ray) Date: Tue, 26 Feb 2008 13:26:30 -0600 Subject: [rspec-devel] Output Stripping out "a" characters? Message-ID: <29a0119e0802261126td01ca02q93ae10b3b82a552b@mail.gmail.com> This is a really weird ... I put rSpec on a project that we're developing ... it only has the one default spec which reads: * #Delete this example and add some real ones it "should use Admin::EulasController" do controller.should be_an_instance_of(Admin::EulasController) end* The test succeeds, but for some reason it is stripping out the "a" characters ... for example: This is my output: dmin::EulsHelper - should include the dmin::EulsHelper dmin::EulsController - should use dmin::EulsController Finished in 0.61 seconds 2 exmples, 0 filures I'm at a loss for where to even start with this ... I promise we don't have the "acts_as_replacement_for_a_characters" plugin loaded. Does anyone have any suggestions or seen this before? -- Bryan Ray http://www.bryanray.net "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/rspec-devel/attachments/20080226/149ba5db/attachment-0001.html From dchelimsky at gmail.com Tue Feb 26 14:36:28 2008 From: dchelimsky at gmail.com (David Chelimsky) Date: Tue, 26 Feb 2008 13:36:28 -0600 Subject: [rspec-devel] Output Stripping out "a" characters? In-Reply-To: <29a0119e0802261126td01ca02q93ae10b3b82a552b@mail.gmail.com> References: <29a0119e0802261126td01ca02q93ae10b3b82a552b@mail.gmail.com> Message-ID: <57c63afe0802261136n38cad6fah7caee2f4a2260fcc@mail.gmail.com> On Tue, Feb 26, 2008 at 1:26 PM, Bryan Ray wrote: > This is a really weird ... > > I put rSpec on a project that we're developing ... it only has the one > default spec which reads: > > #Delete this example and add some real ones > it "should use Admin::EulasController" do > controller.should be_an_instance_of(Admin::EulasController) > end > > The test succeeds, but for some reason it is stripping out the "a" > characters ... for example: > > This is my output: > > dmin::EulsHelper > - should include the dmin::EulsHelper > > dmin::EulsController > - should use dmin::EulsController > > Finished in 0.61 seconds > > 2 exmples, 0 filures > > I'm at a loss for where to even start with this ... I promise we don't have > the "acts_as_replacement_for_a_characters" plugin loaded. > > Does anyone have any suggestions or seen this before? I have seen that before - a while back - I think it was only on windows - are you on windows? Regardless, I have no recollection of what the problem was. > > -- > Bryan Ray > http://www.bryanray.net > > "Programming today is a race between software engineers striving to build > bigger and better idiot-proof programs, and the Universe trying to produce > bigger and better idiots. So far, the Universe is winning." > _______________________________________________ > rspec-devel mailing list > rspec-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-devel > From bryansray at gmail.com Tue Feb 26 14:42:46 2008 From: bryansray at gmail.com (Bryan Ray) Date: Tue, 26 Feb 2008 13:42:46 -0600 Subject: [rspec-devel] Output Stripping out "a" characters? In-Reply-To: <57c63afe0802261136n38cad6fah7caee2f4a2260fcc@mail.gmail.com> References: <29a0119e0802261126td01ca02q93ae10b3b82a552b@mail.gmail.com> <57c63afe0802261136n38cad6fah7caee2f4a2260fcc@mail.gmail.com> Message-ID: <29a0119e0802261142vf3c9ba4kee4c866090403f68@mail.gmail.com> Yes, unfortunately, this is on a Window's machine. On Tue, Feb 26, 2008 at 1:36 PM, David Chelimsky wrote: > On Tue, Feb 26, 2008 at 1:26 PM, Bryan Ray wrote: > > This is a really weird ... > > > > I put rSpec on a project that we're developing ... it only has the one > > default spec which reads: > > > > #Delete this example and add some real ones > > it "should use Admin::EulasController" do > > controller.should be_an_instance_of(Admin::EulasController) > > end > > > > The test succeeds, but for some reason it is stripping out the "a" > > characters ... for example: > > > > This is my output: > > > > dmin::EulsHelper > > - should include the dmin::EulsHelper > > > > dmin::EulsController > > - should use dmin::EulsController > > > > Finished in 0.61 seconds > > > > 2 exmples, 0 filures > > > > I'm at a loss for where to even start with this ... I promise we don't > have > > the "acts_as_replacement_for_a_characters" plugin loaded. > > > > Does anyone have any suggestions or seen this before? > > I have seen that before - a while back - I think it was only on > windows - are you on windows? Regardless, I have no recollection of > what the problem was. > > > > > -- > > Bryan Ray > > http://www.bryanray.net > > > > "Programming today is a race between software engineers striving to > build > > bigger and better idiot-proof programs, and the Universe trying to > produce > > bigger and better idiots. So far, the Universe is winning." > > _______________________________________________ > > rspec-devel mailing list > > rspec-devel at rubyforge.org > > http://rubyforge.org/mailman/listinfo/rspec-devel > > > _______________________________________________ > rspec-devel mailing list > rspec-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-devel > -- Bryan Ray http://www.bryanray.net "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/rspec-devel/attachments/20080226/6efce888/attachment.html From bryansray at gmail.com Tue Feb 26 14:49:07 2008 From: bryansray at gmail.com (Bryan Ray) Date: Tue, 26 Feb 2008 13:49:07 -0600 Subject: [rspec-devel] Output Stripping out "a" characters? In-Reply-To: <57c63afe0802261136n38cad6fah7caee2f4a2260fcc@mail.gmail.com> References: <29a0119e0802261126td01ca02q93ae10b3b82a552b@mail.gmail.com> <57c63afe0802261136n38cad6fah7caee2f4a2260fcc@mail.gmail.com> Message-ID: <29a0119e0802261149j2e1198eeq88bc54ce87ad0e8f@mail.gmail.com> Interesting ... if I remove the "--colour" option from the spec.opts it works ... at least that puts me in an issue with redgreen? Any chance pointing me in a direction in rspec where "coloring" takes place? On Tue, Feb 26, 2008 at 1:36 PM, David Chelimsky wrote: > On Tue, Feb 26, 2008 at 1:26 PM, Bryan Ray wrote: > > This is a really weird ... > > > > I put rSpec on a project that we're developing ... it only has the one > > default spec which reads: > > > > #Delete this example and add some real ones > > it "should use Admin::EulasController" do > > controller.should be_an_instance_of(Admin::EulasController) > > end > > > > The test succeeds, but for some reason it is stripping out the "a" > > characters ... for example: > > > > This is my output: > > > > dmin::EulsHelper > > - should include the dmin::EulsHelper > > > > dmin::EulsController > > - should use dmin::EulsController > > > > Finished in 0.61 seconds > > > > 2 exmples, 0 filures > > > > I'm at a loss for where to even start with this ... I promise we don't > have > > the "acts_as_replacement_for_a_characters" plugin loaded. > > > > Does anyone have any suggestions or seen this before? > > I have seen that before - a while back - I think it was only on > windows - are you on windows? Regardless, I have no recollection of > what the problem was. > > > > > -- > > Bryan Ray > > http://www.bryanray.net > > > > "Programming today is a race between software engineers striving to > build > > bigger and better idiot-proof programs, and the Universe trying to > produce > > bigger and better idiots. So far, the Universe is winning." > > _______________________________________________ > > rspec-devel mailing list > > rspec-devel at rubyforge.org > > http://rubyforge.org/mailman/listinfo/rspec-devel > > > _______________________________________________ > rspec-devel mailing list > rspec-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-devel > -- Bryan Ray http://www.bryanray.net "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/rspec-devel/attachments/20080226/af73832e/attachment.html From dchelimsky at gmail.com Tue Feb 26 14:58:33 2008 From: dchelimsky at gmail.com (David Chelimsky) Date: Tue, 26 Feb 2008 13:58:33 -0600 Subject: [rspec-devel] Output Stripping out "a" characters? In-Reply-To: <29a0119e0802261149j2e1198eeq88bc54ce87ad0e8f@mail.gmail.com> References: <29a0119e0802261126td01ca02q93ae10b3b82a552b@mail.gmail.com> <57c63afe0802261136n38cad6fah7caee2f4a2260fcc@mail.gmail.com> <29a0119e0802261149j2e1198eeq88bc54ce87ad0e8f@mail.gmail.com> Message-ID: <57c63afe0802261158x5c7c157bu11723a4b042d416a@mail.gmail.com> On Tue, Feb 26, 2008 at 1:49 PM, Bryan Ray wrote: > Interesting ... if I remove the "--colour" option from the spec.opts it > works ... at least that puts me in an issue with redgreen? > > Any chance pointing me in a direction in rspec where "coloring" takes place? lib/spec/runner/formatter/base_text_formatter.rb > > > On Tue, Feb 26, 2008 at 1:36 PM, David Chelimsky > wrote: > > > > > > On Tue, Feb 26, 2008 at 1:26 PM, Bryan Ray wrote: > > > This is a really weird ... > > > > > > I put rSpec on a project that we're developing ... it only has the one > > > default spec which reads: > > > > > > #Delete this example and add some real ones > > > it "should use Admin::EulasController" do > > > controller.should be_an_instance_of(Admin::EulasController) > > > end > > > > > > The test succeeds, but for some reason it is stripping out the "a" > > > characters ... for example: > > > > > > This is my output: > > > > > > dmin::EulsHelper > > > - should include the dmin::EulsHelper > > > > > > dmin::EulsController > > > - should use dmin::EulsController > > > > > > Finished in 0.61 seconds > > > > > > 2 exmples, 0 filures > > > > > > I'm at a loss for where to even start with this ... I promise we don't > have > > > the "acts_as_replacement_for_a_characters" plugin loaded. > > > > > > Does anyone have any suggestions or seen this before? > > > > I have seen that before - a while back - I think it was only on > > windows - are you on windows? Regardless, I have no recollection of > > what the problem was. > > > > > > > > -- > > > > > Bryan Ray > > > http://www.bryanray.net > > > > > > "Programming today is a race between software engineers striving to > build > > > bigger and better idiot-proof programs, and the Universe trying to > produce > > > bigger and better idiots. So far, the Universe is winning." > > > _______________________________________________ > > > rspec-devel mailing list > > > rspec-devel at rubyforge.org > > > http://rubyforge.org/mailman/listinfo/rspec-devel > > > > > _______________________________________________ > > rspec-devel mailing list > > rspec-devel at rubyforge.org > > http://rubyforge.org/mailman/listinfo/rspec-devel > > > > > > -- > > Bryan Ray > http://www.bryanray.net > > "Programming today is a race between software engineers striving to build > bigger and better idiot-proof programs, and the Universe trying to produce > bigger and better idiots. So far, the Universe is winning." > _______________________________________________ > rspec-devel mailing list > rspec-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-devel > From mlangenberg at gmail.com Tue Feb 26 15:54:42 2008 From: mlangenberg at gmail.com (Matthijs Langenberg) Date: Tue, 26 Feb 2008 21:54:42 +0100 Subject: [rspec-devel] [ANN] quicktest - an RSpec wrapper for in-lining tests In-Reply-To: References: Message-ID: <27c0ac6d0802261254y3ed8cd75hedbd0adbae32290@mail.gmail.com> It would almost be possible to generate the actual ruby code from the quicktest method ;-). To be honest, I like it that my examples don't mix with the actual code, it looks a bit cleaner. Interesting approach though, maybe I'll give it a shot. On Tue, Feb 26, 2008 at 1:56 PM, greg weber wrote: > == ABOUT > Quicktest is a utility for inlining ruby unit tests with the ruby code > under test > > The typical test driven development workflow requires constant switching > between the file containg the source code and the the file containg the > tests. When creating code, it can be more convenient to place tests > immediately after the code you are writing. After the code has been > written, it may be a good idea to move it to another file, but the option to > permanently keep tests with the source is available (useful for scripts). > > Quicktest is designed to support quick tests in a framework agnostic way. > Currently, only an rspec testrunner is available, but it is trivial to write > one for another testing framework. > > == FEATURES > Quicktest uses method tracing to know the method you are testing. By > default the output of a failed test will show the object and method name. > > == USAGE > To test a method, place another method called 'quicktest' immediately > after it > the quicktest method has three OPTIONAL arguments > - the test runner object > - a reference to self > - a method object for the method under test > > run with spec -r quicktest file_to_test > > There is a convenience script so that you can just run > > quickspec file_to_test > > == NOTES > - leaving test code in with your production code is not necessarily a good > idea, but there is almost no runtime overhead to doing so since ruby will > not evaluate code in a method until the method is invoked > - quicktest instance methods not working properly? if the class (or one of > its ancestors) is overriding method tracing than including QuickTest::Tracer > will fix it. > > > example: run with bin/quickspec > > class Foo > attr_reader :bar > > def initialize > @bar = true > end > def quicktest t, s > t.it "bar should be initialized to true" do > s.bar.should == true > end > end > > def self.hello arg > "hello" + arg > end > def self.quicktest t, s, meth > t.it "should prepend 'hello' to its argument" do > meth["world"].should == 'hello world' # error - no space > 'helloworld' > end > end > end > > > Running quicktest on the above outputs the following: > .F > > 1) > 'Foo hello should prepend 'hello' to its argument' FAILED > expected: "hello world", > got: "helloworld" (using ==) > ./README:22:in `quicktest' > /home/greg/quicktest/lib/quicktest.rb:65:in `instance_eval' > /home/greg/quicktest/lib/quicktest.rb:65:in `run_tests' > > Finished in 0.008338 seconds > > 2 examples, 1 failure > > _______________________________________________ > rspec-devel mailing list > rspec-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-devel > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/rspec-devel/attachments/20080226/028dbce7/attachment-0001.html From coreyhaines at gmail.com Tue Feb 26 18:53:57 2008 From: coreyhaines at gmail.com (Corey Haines) Date: Tue, 26 Feb 2008 18:53:57 -0500 Subject: [rspec-devel] [ANN] quicktest - an RSpec wrapper for in-lining tests In-Reply-To: <27c0ac6d0802261254y3ed8cd75hedbd0adbae32290@mail.gmail.com> References: <27c0ac6d0802261254y3ed8cd75hedbd0adbae32290@mail.gmail.com> Message-ID: <6bdacb70802261553o343e3f2asf7dc00ad5c39e77f@mail.gmail.com> This is interesting. I really like the python doctest stuff, but, while using it with a friend on writing something, it seemed almost to start to get cumbersome for lots of examples. I have several specs per method, so I wonder how it scales. -Corey On Tue, Feb 26, 2008 at 3:54 PM, Matthijs Langenberg wrote: > It would almost be possible to generate the actual ruby code from the > quicktest method ;-). > > To be honest, I like it that my examples don't mix with the actual code, > it looks a bit cleaner. Interesting approach though, maybe I'll give it a > shot. > > > On Tue, Feb 26, 2008 at 1:56 PM, greg weber wrote: > > > == ABOUT > > Quicktest is a utility for inlining ruby unit tests with the ruby code > > under test > > > > The typical test driven development workflow requires constant switching > > between the file containg the source code and the the file containg the > > tests. When creating code, it can be more convenient to place tests > > immediately after the code you are writing. After the code has been > > written, it may be a good idea to move it to another file, but the option to > > permanently keep tests with the source is available (useful for scripts). > > > > Quicktest is designed to support quick tests in a framework agnostic > > way. Currently, only an rspec testrunner is available, but it is trivial to > > write one for another testing framework. > > > > == FEATURES > > Quicktest uses method tracing to know the method you are testing. By > > default the output of a failed test will show the object and method name. > > > > == USAGE > > To test a method, place another method called 'quicktest' immediately > > after it > > the quicktest method has three OPTIONAL arguments > > - the test runner object > > - a reference to self > > - a method object for the method under test > > > > run with spec -r quicktest file_to_test > > > > There is a convenience script so that you can just run > > > > quickspec file_to_test > > > > == NOTES > > - leaving test code in with your production code is not necessarily a > > good idea, but there is almost no runtime overhead to doing so since ruby > > will not evaluate code in a method until the method is invoked > > - quicktest instance methods not working properly? if the class (or one > > of its ancestors) is overriding method tracing than including > > QuickTest::Tracer will fix it. > > > > > > example: run with bin/quickspec > > > > class Foo > > attr_reader :bar > > > > def initialize > > @bar = true > > end > > def quicktest t, s > > t.it "bar should be initialized to true" do > > s.bar.should == true > > end > > end > > > > def self.hello arg > > "hello" + arg > > end > > def self.quicktest t, s, meth > > t.it "should prepend 'hello' to its argument" do > > meth["world"].should == 'hello world' # error - no space > > 'helloworld' > > end > > end > > end > > > > > > Running quicktest on the above outputs the following: > > .F > > > > 1) > > 'Foo hello should prepend 'hello' to its argument' FAILED > > expected: "hello world", > > got: "helloworld" (using ==) > > ./README:22:in `quicktest' > > /home/greg/quicktest/lib/quicktest.rb:65:in `instance_eval' > > /home/greg/quicktest/lib/quicktest.rb:65:in `run_tests' > > > > Finished in 0.008338 seconds > > > > 2 examples, 1 failure > > > > _______________________________________________ > > rspec-devel mailing list > > rspec-devel at rubyforge.org > > http://rubyforge.org/mailman/listinfo/rspec-devel > > > > > _______________________________________________ > rspec-devel mailing list > rspec-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-devel > -- http://www.coreyhaines.com The Internet's Premiere source of information about Corey Haines -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/rspec-devel/attachments/20080226/e18ce4a4/attachment.html From webs.dev at gmail.com Wed Feb 27 00:33:26 2008 From: webs.dev at gmail.com (greg weber) Date: Tue, 26 Feb 2008 23:33:26 -0600 Subject: [rspec-devel] [ANN] quicktest - an RSpec wrapper for in-lining tests In-Reply-To: <27c0ac6d0802261254y3ed8cd75hedbd0adbae32290@mail.gmail.com> References: <27c0ac6d0802261254y3ed8cd75hedbd0adbae32290@mail.gmail.com> Message-ID: > It would almost be possible to generate the actual ruby code from the > quicktest method ;-). > That's kind of what it is doing (If I understand what you are saying). The test runner methods store the testing blocks and then place them in a proper rspec describe block where they have access to all of rspec So rspec's before and after also work. > > To be honest, I like it that my examples don't mix with the actual code, > it looks a bit cleaner. Interesting approach though, maybe I'll give it a > shot. > > > On Tue, Feb 26, 2008 at 1:56 PM, greg weber wrote: > > > == ABOUT > > Quicktest is a utility for inlining ruby unit tests with the ruby code > > under test > > > > The typical test driven development workflow requires constant switching > > between the file containg the source code and the the file containg the > > tests. When creating code, it can be more convenient to place tests > > immediately after the code you are writing. After the code has been > > written, it may be a good idea to move it to another file, but the option to > > permanently keep tests with the source is available (useful for scripts). > > > > Quicktest is designed to support quick tests in a framework agnostic > > way. Currently, only an rspec testrunner is available, but it is trivial to > > write one for another testing framework. > > > > == FEATURES > > Quicktest uses method tracing to know the method you are testing. By > > default the output of a failed test will show the object and method name. > > > > == USAGE > > To test a method, place another method called 'quicktest' immediately > > after it > > the quicktest method has three OPTIONAL arguments > > - the test runner object > > - a reference to self > > - a method object for the method under test > > > > run with spec -r quicktest file_to_test > > > > There is a convenience script so that you can just run > > > > quickspec file_to_test > > > > == NOTES > > - leaving test code in with your production code is not necessarily a > > good idea, but there is almost no runtime overhead to doing so since ruby > > will not evaluate code in a method until the method is invoked > > - quicktest instance methods not working properly? if the class (or one > > of its ancestors) is overriding method tracing than including > > QuickTest::Tracer will fix it. > > > > > > example: run with bin/quickspec > > > > class Foo > > attr_reader :bar > > > > def initialize > > @bar = true > > end > > def quicktest t, s > > t.it "bar should be initialized to true" do > > s.bar.should == true > > end > > end > > > > def self.hello arg > > "hello" + arg > > end > > def self.quicktest t, s, meth > > t.it "should prepend 'hello' to its argument" do > > meth["world"].should == 'hello world' # error - no space > > 'helloworld' > > end > > end > > end > > > > > > Running quicktest on the above outputs the following: > > .F > > > > 1) > > 'Foo hello should prepend 'hello' to its argument' FAILED > > expected: "hello world", > > got: "helloworld" (using ==) > > ./README:22:in `quicktest' > > /home/greg/quicktest/lib/quicktest.rb:65:in `instance_eval' > > /home/greg/quicktest/lib/quicktest.rb:65:in `run_tests' > > > > Finished in 0.008338 seconds > > > > 2 examples, 1 failure > > > > _______________________________________________ > > rspec-devel mailing list > > rspec-devel at rubyforge.org > > http://rubyforge.org/mailman/listinfo/rspec-devel > > > > > _______________________________________________ > rspec-devel mailing list > rspec-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-devel > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/rspec-devel/attachments/20080226/a528dbc5/attachment.html From webs.dev at gmail.com Wed Feb 27 00:55:47 2008 From: webs.dev at gmail.com (greg weber) Date: Tue, 26 Feb 2008 23:55:47 -0600 Subject: [rspec-devel] [ANN] quicktest - an RSpec wrapper for in-lining tests In-Reply-To: <6bdacb70802261553o343e3f2asf7dc00ad5c39e77f@mail.gmail.com> References: <27c0ac6d0802261254y3ed8cd75hedbd0adbae32290@mail.gmail.com> <6bdacb70802261553o343e3f2asf7dc00ad5c39e77f@mail.gmail.com> Message-ID: On Tue, Feb 26, 2008 at 5:53 PM, Corey Haines wrote: > This is interesting. I really like the python doctest stuff, but, while > using it with a friend on writing something, it seemed almost to start to > get cumbersome for lots of examples. I have several specs per method, so I > wonder how it scales. > > -Corey > It probably doesn't scale very well- but you can put as many 'it' blocks as you like in the quicktest method. Python doctest is an interesting concept- but relying on printed representations of data is limiting and fragile. Quicktest came out of my dabbling in the D programming language, which allows you to place testing blocks inline with your source code unittest{ ... } Normally, these blocks are ignored, but if you compile with a different switch, they are linked in and ran at the beginning of your program. Originally, I made an exact copy of this, but among other things, it requires the placement of a line like (def unittest;end) if not defined? unittest at the beginning of the file. It would be nice if Ruby had a similar construct built in. > On Tue, Feb 26, 2008 at 3:54 PM, Matthijs Langenberg < > mlangenberg at gmail.com> wrote: > > > It would almost be possible to generate the actual ruby code from the > > quicktest method ;-). > > > > To be honest, I like it that my examples don't mix with the actual code, > > it looks a bit cleaner. Interesting approach though, maybe I'll give it a > > shot. > > > > > > On Tue, Feb 26, 2008 at 1:56 PM, greg weber wrote: > > > > > == ABOUT > > > Quicktest is a utility for inlining ruby unit tests with the ruby code > > > under test > > > > > > The typical test driven development workflow requires constant > > > switching between the file containg the source code and the the file > > > containg the tests. When creating code, it can be more convenient to place > > > tests immediately after the code you are writing. After the code has been > > > written, it may be a good idea to move it to another file, but the option to > > > permanently keep tests with the source is available (useful for scripts). > > > > > > Quicktest is designed to support quick tests in a framework agnostic > > > way. Currently, only an rspec testrunner is available, but it is trivial to > > > write one for another testing framework. > > > > > > == FEATURES > > > Quicktest uses method tracing to know the method you are testing. By > > > default the output of a failed test will show the object and method name. > > > > > > == USAGE > > > To test a method, place another method called 'quicktest' immediately > > > after it > > > the quicktest method has three OPTIONAL arguments > > > - the test runner object > > > - a reference to self > > > - a method object for the method under test > > > > > > run with spec -r quicktest file_to_test > > > > > > There is a convenience script so that you can just run > > > > > > quickspec file_to_test > > > > > > == NOTES > > > - leaving test code in with your production code is not necessarily a > > > good idea, but there is almost no runtime overhead to doing so since ruby > > > will not evaluate code in a method until the method is invoked > > > - quicktest instance methods not working properly? if the class (or > > > one of its ancestors) is overriding method tracing than including > > > QuickTest::Tracer will fix it. > > > > > > > > > example: run with bin/quickspec > > > > > > class Foo > > > attr_reader :bar > > > > > > def initialize > > > @bar = true > > > end > > > def quicktest t, s > > > t.it "bar should be initialized to true" do > > > s.bar.should == true > > > end > > > end > > > > > > def self.hello arg > > > "hello" + arg > > > end > > > def self.quicktest t, s, meth > > > t.it "should prepend 'hello' to its argument" do > > > meth["world"].should == 'hello world' # error - no space > > > 'helloworld' > > > end > > > end > > > end > > > > > > > > > Running quicktest on the above outputs the following: > > > .F > > > > > > 1) > > > 'Foo hello should prepend 'hello' to its argument' FAILED > > > expected: "hello world", > > > got: "helloworld" (using ==) > > > ./README:22:in `quicktest' > > > /home/greg/quicktest/lib/quicktest.rb:65:in `instance_eval' > > > /home/greg/quicktest/lib/quicktest.rb:65:in `run_tests' > > > > > > Finished in 0.008338 seconds > > > > > > 2 examples, 1 failure > > > > > > _______________________________________________ > > > rspec-devel mailing list > > > rspec-devel at rubyforge.org > > > http://rubyforge.org/mailman/listinfo/rspec-devel > > > > > > > > > _______________________________________________ > > rspec-devel mailing list > > rspec-devel at rubyforge.org > > http://rubyforge.org/mailman/listinfo/rspec-devel > > > > > > -- > http://www.coreyhaines.com > The Internet's Premiere source of information about Corey Haines > _______________________________________________ > rspec-devel mailing list > rspec-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-devel > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/rspec-devel/attachments/20080226/f40f27a5/attachment-0001.html From dchelimsky at gmail.com Wed Feb 27 01:00:16 2008 From: dchelimsky at gmail.com (David Chelimsky) Date: Wed, 27 Feb 2008 00:00:16 -0600 Subject: [rspec-devel] the git experiment Message-ID: <57c63afe0802262200o6bd5ef9fy112034c9c5d276f5@mail.gmail.com> Hey all, A while back I mentioned that we were going to move to git or hg. We decided that we'd experiment with each for a month and see how it goes. We're going to start with git. Obviously if all goes well we'll have to reassess whether or not to also give hg a try. We have a repo set up at gitorious: Project page: http://gitorious.org/projects/rspec. Clone the repo: git clone git at gitorious.org:rspec/mainline.git We'll be setting up synchronization with subversion, so you'll be able to keep the rails plugins up to date, but it's a few days out before that's set up. In the meantime, you rails'ers who want to keep up with the plugins will have to clone the repo and move stuff around locally. Keep in mind that this is an experiment. The official repo is still the subversion repo at rubyforge until further notice. Cheers, David From pergesu at gmail.com Wed Feb 27 04:45:25 2008 From: pergesu at gmail.com (Pat Maddox) Date: Wed, 27 Feb 2008 01:45:25 -0800 Subject: [rspec-devel] the git experiment In-Reply-To: <57c63afe0802262200o6bd5ef9fy112034c9c5d276f5@mail.gmail.com> References: <57c63afe0802262200o6bd5ef9fy112034c9c5d276f5@mail.gmail.com> Message-ID: <810a540e0802270145h477a2688g26707bdfa7612929@mail.gmail.com> On Tue, Feb 26, 2008 at 10:00 PM, David Chelimsky wrote: > Clone the repo: > git clone git at gitorious.org:rspec/mainline.git I found git clone git://gitorious.org/rspec/mainline.git to work much better. Very excited, than you! Pat From coreyhaines at gmail.com Wed Feb 27 07:23:45 2008 From: coreyhaines at gmail.com (Corey Haines) Date: Wed, 27 Feb 2008 07:23:45 -0500 Subject: [rspec-devel] [ANN] quicktest - an RSpec wrapper for in-lining tests In-Reply-To: References: <27c0ac6d0802261254y3ed8cd75hedbd0adbae32290@mail.gmail.com> <6bdacb70802261553o343e3f2asf7dc00ad5c39e77f@mail.gmail.com> Message-ID: <6bdacb70802270423q4bba8affr4e183de6b64cec39@mail.gmail.com> It is definitely an interesting thing to try out. I've only used doctest once, and we quickly moved out of using it into a separate class. How do you see this being used with external examples? Replace external with inline? Used in conjunction? If it is used in conjunction, what cases do you see when you would use the inline? I'm not trying to shoot the idea down, I'm just trying to start a conversation about where this would be most useful. thanks. -Corey On Wed, Feb 27, 2008 at 12:55 AM, greg weber wrote: > On Tue, Feb 26, 2008 at 5:53 PM, Corey Haines > wrote: > > > This is interesting. I really like the python doctest stuff, but, while > > using it with a friend on writing something, it seemed almost to start to > > get cumbersome for lots of examples. I have several specs per method, so I > > wonder how it scales. > > > > -Corey > > > > It probably doesn't scale very well- but you can put as many 'it' blocks > as you like in the quicktest method. Python doctest is an interesting > concept- but relying on printed representations of data is limiting and > fragile. > Quicktest came out of my dabbling in the D programming language, which > allows you to place testing blocks inline with your source code > unittest{ > ... > } > > Normally, these blocks are ignored, but if you compile with a different > switch, they are linked in and ran at the beginning of your program. > Originally, I made an exact copy of this, but among other things, it > requires the placement of a line like > (def unittest;end) if not defined? unittest > at the beginning of the file. It would be nice if Ruby had a similar > construct built in. > > > > On Tue, Feb 26, 2008 at 3:54 PM, Matthijs Langenberg < > > mlangenberg at gmail.com> wrote: > > > > > It would almost be possible to generate the actual ruby code from the > > > quicktest method ;-). > > > > > > To be honest, I like it that my examples don't mix with the actual > > > code, it looks a bit cleaner. Interesting approach though, maybe I'll give > > > it a shot. > > > > > > > > > On Tue, Feb 26, 2008 at 1:56 PM, greg weber > > > wrote: > > > > > > > == ABOUT > > > > Quicktest is a utility for inlining ruby unit tests with the ruby > > > > code under test > > > > > > > > The typical test driven development workflow requires constant > > > > switching between the file containg the source code and the the file > > > > containg the tests. When creating code, it can be more convenient to place > > > > tests immediately after the code you are writing. After the code has been > > > > written, it may be a good idea to move it to another file, but the option to > > > > permanently keep tests with the source is available (useful for scripts). > > > > > > > > Quicktest is designed to support quick tests in a framework agnostic > > > > way. Currently, only an rspec testrunner is available, but it is trivial to > > > > write one for another testing framework. > > > > > > > > == FEATURES > > > > Quicktest uses method tracing to know the method you are testing. By > > > > default the output of a failed test will show the object and method name. > > > > > > > > == USAGE > > > > To test a method, place another method called 'quicktest' > > > > immediately after it > > > > the quicktest method has three OPTIONAL arguments > > > > - the test runner object > > > > - a reference to self > > > > - a method object for the method under test > > > > > > > > run with spec -r quicktest file_to_test > > > > > > > > There is a convenience script so that you can just run > > > > > > > > quickspec file_to_test > > > > > > > > == NOTES > > > > - leaving test code in with your production code is not necessarily > > > > a good idea, but there is almost no runtime overhead to doing so since ruby > > > > will not evaluate code in a method until the method is invoked > > > > - quicktest instance methods not working properly? if the class (or > > > > one of its ancestors) is overriding method tracing than including > > > > QuickTest::Tracer will fix it. > > > > > > > > > > > > example: run with bin/quickspec > > > > > > > > class Foo > > > > attr_reader :bar > > > > > > > > def initialize > > > > @bar = true > > > > end > > > > def quicktest t, s > > > > t.it "bar should be initialized to true" do > > > > s.bar.should == true > > > > end > > > > end > > > > > > > > def self.hello arg > > > > "hello" + arg > > > > end > > > > def self.quicktest t, s, meth > > > > t.it "should prepend 'hello' to its argument" do > > > > meth["world"].should == 'hello world' # error - no space > > > > 'helloworld' > > > > end > > > > end > > > > end > > > > > > > > > > > > Running quicktest on the above outputs the following: > > > > .F > > > > > > > > 1) > > > > 'Foo hello should prepend 'hello' to its argument' FAILED > > > > expected: "hello world", > > > > got: "helloworld" (using ==) > > > > ./README:22:in `quicktest' > > > > /home/greg/quicktest/lib/quicktest.rb:65:in `instance_eval' > > > > /home/greg/quicktest/lib/quicktest.rb:65:in `run_tests' > > > > > > > > Finished in 0.008338 seconds > > > > > > > > 2 examples, 1 failure > > > > > > > > _______________________________________________ > > > > rspec-devel mailing list > > > > rspec-devel at rubyforge.org > > > > http://rubyforge.org/mailman/listinfo/rspec-devel > > > > > > > > > > > > > _______________________________________________ > > > rspec-devel mailing list > > > rspec-devel at rubyforge.org > > > http://rubyforge.org/mailman/listinfo/rspec-devel > > > > > > > > > > > -- > > http://www.coreyhaines.com > > The Internet's Premiere source of information about Corey Haines > > _______________________________________________ > > rspec-devel mailing list > > rspec-devel at rubyforge.org > > http://rubyforge.org/mailman/listinfo/rspec-devel > > > > > _______________________________________________ > rspec-devel mailing list > rspec-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-devel > -- http://www.coreyhaines.com The Internet's Premiere source of information about Corey Haines -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/rspec-devel/attachments/20080227/b83d9d19/attachment.html From bryansray at gmail.com Wed Feb 27 08:42:06 2008 From: bryansray at gmail.com (Bryan Ray) Date: Wed, 27 Feb 2008 07:42:06 -0600 Subject: [rspec-devel] the git experiment In-Reply-To: <810a540e0802270145h477a2688g26707bdfa7612929@mail.gmail.com> References: <57c63afe0802262200o6bd5ef9fy112034c9c5d276f5@mail.gmail.com> <810a540e0802270145h477a2688g26707bdfa7612929@mail.gmail.com> Message-ID: <29a0119e0802270542j3dc87dbdy8d05749caec2c0a7@mail.gmail.com> Nice. I look forward to seeing how this pans out. Been looking for a reason to give git a try. On Wed, Feb 27, 2008 at 3:45 AM, Pat Maddox wrote: > On Tue, Feb 26, 2008 at 10:00 PM, David Chelimsky > wrote: > > Clone the repo: > > git clone git at gitorious.org:rspec/mainline.git > > I found > git clone git://gitorious.org/rspec/mainline.git > > to work much better. > > Very excited, than you! > > Pat > _______________________________________________ > rspec-devel mailing list > rspec-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-devel > -- Bryan Ray http://www.bryanray.net "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/rspec-devel/attachments/20080227/5692c2b1/attachment.html From dchelimsky at gmail.com Wed Feb 27 09:24:12 2008 From: dchelimsky at gmail.com (David Chelimsky) Date: Wed, 27 Feb 2008 08:24:12 -0600 Subject: [rspec-devel] the git experiment In-Reply-To: <810a540e0802270145h477a2688g26707bdfa7612929@mail.gmail.com> References: <57c63afe0802262200o6bd5ef9fy112034c9c5d276f5@mail.gmail.com> <810a540e0802270145h477a2688g26707bdfa7612929@mail.gmail.com> Message-ID: <57c63afe0802270624w3cc17a05g18c61efc162f2253@mail.gmail.com> On Wed, Feb 27, 2008 at 3:45 AM, Pat Maddox wrote: > On Tue, Feb 26, 2008 at 10:00 PM, David Chelimsky wrote: > > Clone the repo: > > git clone git at gitorious.org:rspec/mainline.git > > I found > > git clone git://gitorious.org/rspec/mainline.git > > to work much better. That is correct - sadly, I copied that directly from the gitorious site! Geez :) > > Very excited, than you! > > Pat > _______________________________________________ > rspec-devel mailing list > rspec-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-devel > From dchelimsky at gmail.com Wed Feb 27 09:27:03 2008 From: dchelimsky at gmail.com (David Chelimsky) Date: Wed, 27 Feb 2008 08:27:03 -0600 Subject: [rspec-devel] the git experiment In-Reply-To: <57c63afe0802262200o6bd5ef9fy112034c9c5d276f5@mail.gmail.com> References: <57c63afe0802262200o6bd5ef9fy112034c9c5d276f5@mail.gmail.com> Message-ID: <57c63afe0802270627k6a7321f2k6f66de92fba1228e@mail.gmail.com> On Wed, Feb 27, 2008 at 12:00 AM, David Chelimsky wrote: > Hey all, > > A while back I mentioned that we were going to move to git or hg. We > decided that we'd experiment with each for a month and see how it > goes. > > We're going to start with git. Obviously if all goes well we'll have > to reassess whether or not to also give hg a try. > > We have a repo set up at gitorious: > > Project page: > http://gitorious.org/projects/rspec. > > Clone the repo: > git clone git at gitorious.org:rspec/mainline.git Correction: this should be: git clone git://gitorious.org/rspec/mainline.git > > We'll be setting up synchronization with subversion, so you'll be able > to keep the rails plugins up to date, but it's a few days out before > that's set up. In the meantime, you rails'ers who want to keep up with > the plugins will have to clone the repo and move stuff around locally. > > Keep in mind that this is an experiment. The official repo is still > the subversion repo at rubyforge until further notice. > > Cheers, > David > From webs.dev at gmail.com Wed Feb 27 10:27:18 2008 From: webs.dev at gmail.com (greg weber) Date: Wed, 27 Feb 2008 09:27:18 -0600 Subject: [rspec-devel] [ANN] quicktest - an RSpec wrapper for in-lining tests In-Reply-To: <6bdacb70802270423q4bba8affr4e183de6b64cec39@mail.gmail.com> References: <27c0ac6d0802261254y3ed8cd75hedbd0adbae32290@mail.gmail.com> <6bdacb70802261553o343e3f2asf7dc00ad5c39e77f@mail.gmail.com> <6bdacb70802270423q4bba8affr4e183de6b64cec39@mail.gmail.com> Message-ID: On Wed, Feb 27, 2008 at 6:23 AM, Corey Haines wrote: > It is definitely an interesting thing to try out. I've only used doctest > once, and we quickly moved out of using it into a separate class. > > How do you see this being used with external examples? Replace external > with inline? Used in conjunction? If it is used in conjunction, what cases > do you see when you would use the inline? > > I'm not trying to shoot the idea down, I'm just trying to start a > conversation about where this would be most useful. thanks. > > -Corey > Tests are a form of documentation. It can be argued that it is better to have all documentation in the source, but I don't believe that. It is definitely very useful for one file scripts, or any type of code that does not have a well established project home where the tests will be. You can distribute the tests with script so that anyone who wants to modify it can also modify the tests instead of assuming the original author did not write any. You can have a flow of development where a 'quick and dirty' script becomes well tested. You can create a shell function so that you would be testing the file before every run. function test_run () { quickspec $1 && $1 } Otherwise, it is designed as a tool for test-driven development. When writing fresh code you now have the possibility to be directly next to the code under test without having to switch back and forth between files. When you are done writing the new code, you can easily pull all the quicktest methods out and into a spec file. Greg > > > On Wed, Feb 27, 2008 at 12:55 AM, greg weber wrote: > > > On Tue, Feb 26, 2008 at 5:53 PM, Corey Haines > > wrote: > > > > > This is interesting. I really like the python doctest stuff, but, > > > while using it with a friend on writing something, it seemed almost to start > > > to get cumbersome for lots of examples. I have several specs per method, so > > > I wonder how it scales. > > > > > > -Corey > > > > > > > It probably doesn't scale very well- but you can put as many 'it' blocks > > as you like in the quicktest method. Python doctest is an interesting > > concept- but relying on printed representations of data is limiting and > > fragile. > > Quicktest came out of my dabbling in the D programming language, which > > allows you to place testing blocks inline with your source code > > unittest{ > > ... > > } > > > > Normally, these blocks are ignored, but if you compile with a different > > switch, they are linked in and ran at the beginning of your program. > > Originally, I made an exact copy of this, but among other things, it > > requires the placement of a line like > > (def unittest;end) if not defined? unittest > > at the beginning of the file. It would be nice if Ruby had a similar > > construct built in. > > > > > > > On Tue, Feb 26, 2008 at 3:54 PM, Matthijs Langenberg < > > > mlangenberg at gmail.com> wrote: > > > > > > > It would almost be possible to generate the actual ruby code from > > > > the quicktest method ;-). > > > > > > > > To be honest, I like it that my examples don't mix with the actual > > > > code, it looks a bit cleaner. Interesting approach though, maybe I'll give > > > > it a shot. > > > > > > > > > > > > On Tue, Feb 26, 2008 at 1:56 PM, greg weber > > > > wrote: > > > > > > > > > == ABOUT > > > > > Quicktest is a utility for inlining ruby unit tests with the ruby > > > > > code under test > > > > > > > > > > The typical test driven development workflow requires constant > > > > > switching between the file containg the source code and the the file > > > > > containg the tests. When creating code, it can be more convenient to place > > > > > tests immediately after the code you are writing. After the code has been > > > > > written, it may be a good idea to move it to another file, but the option to > > > > > permanently keep tests with the source is available (useful for scripts). > > > > > > > > > > Quicktest is designed to support quick tests in a framework > > > > > agnostic way. Currently, only an rspec testrunner is available, but it is > > > > > trivial to write one for another testing framework. > > > > > > > > > > == FEATURES > > > > > Quicktest uses method tracing to know the method you are testing. > > > > > By default the output of a failed test will show the object and method name. > > > > > > > > > > == USAGE > > > > > To test a method, place another method called 'quicktest' > > > > > immediately after it > > > > > the quicktest method has three OPTIONAL arguments > > > > > - the test runner object > > > > > - a reference to self > > > > > - a method object for the method under test > > > > > > > > > > run with spec -r quicktest file_to_test > > > > > > > > > > There is a convenience script so that you can just run > > > > > > > > > > quickspec file_to_test > > > > > > > > > > == NOTES > > > > > - leaving test code in with your production code is not > > > > > necessarily a good idea, but there is almost no runtime overhead to doing so > > > > > since ruby will not evaluate code in a method until the method is invoked > > > > > - quicktest instance methods not working properly? if the class > > > > > (or one of its ancestors) is overriding method tracing than including > > > > > QuickTest::Tracer will fix it. > > > > > > > > > > > > > > > example: run with bin/quickspec > > > > > > > > > > class Foo > > > > > attr_reader :bar > > > > > > > > > > def initialize > > > > > @bar = true > > > > > end > > > > > def quicktest t, s > > > > > t.it "bar should be initialized to true" do > > > > > s.bar.should == true > > > > > end > > > > > end > > > > > > > > > > def self.hello arg > > > > > "hello" + arg > > > > > end > > > > > def self.quicktest t, s, meth > > > > > t.it "should prepend 'hello' to its argument" do > > > > > meth["world"].should == 'hello world' # error - no space > > > > > 'helloworld' > > > > > end > > > > > end > > > > > end > > > > > > > > > > > > > > > Running quicktest on the above outputs the following: > > > > > .F > > > > > > > > > > 1) > > > > > 'Foo hello should prepend 'hello' to its argument' FAILED > > > > > expected: "hello world", > > > > > got: "helloworld" (using ==) > > > > > ./README:22:in `quicktest' > > > > > /home/greg/quicktest/lib/quicktest.rb:65:in `instance_eval' > > > > > /home/greg/quicktest/lib/quicktest.rb:65:in `run_tests' > > > > > > > > > > Finished in 0.008338 seconds > > > > > > > > > > 2 examples, 1 failure > > > > > > > > > > _______________________________________________ > > > > > rspec-devel mailing list > > > > > rspec-devel at rubyforge.org > > > > > http://rubyforge.org/mailman/listinfo/rspec-devel > > > > > > > > > > > > > > > > > _______________________________________________ > > > > rspec-devel mailing list > > > > rspec-devel at rubyforge.org > > > > http://rubyforge.org/mailman/listinfo/rspec-devel > > > > > > > > > > > > > > > > -- > > > http://www.coreyhaines.com > > > The Internet's Premiere source of information about Corey Haines > > > _______________________________________________ > > > rspec-devel mailing list > > > rspec-devel at rubyforge.org > > > http://rubyforge.org/mailman/listinfo/rspec-devel > > > > > > > > > _______________________________________________ > > rspec-devel mailing list > > rspec-devel at rubyforge.org > > http://rubyforge.org/mailman/listinfo/rspec-devel > > > > > > -- > http://www.coreyhaines.com > The Internet's Premiere source of information about Corey Haines > > _______________________________________________ > rspec-devel mailing list > rspec-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-devel > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/rspec-devel/attachments/20080227/801e99fc/attachment.html From ivey at gweezlebur.com Wed Feb 27 10:21:04 2008 From: ivey at gweezlebur.com (Michael D. Ivey) Date: Wed, 27 Feb 2008 09:21:04 -0600 Subject: [rspec-devel] the git experiment In-Reply-To: <57c63afe0802270624w3cc17a05g18c61efc162f2253@mail.gmail.com> References: <57c63afe0802262200o6bd5ef9fy112034c9c5d276f5@mail.gmail.com> <810a540e0802270145h477a2688g26707bdfa7612929@mail.gmail.com> <57c63afe0802270624w3cc17a05g18c61efc162f2253@mail.gmail.com> Message-ID: <46DEC76A-F0EF-496F-8C1B-07F8ACB1A5DC@gweezlebur.com> On Feb 27, 2008, at 8:24 AM, David Chelimsky wrote: >>> git clone git at gitorious.org:rspec/mainline.git >> git clone git://gitorious.org/rspec/mainline.git > That is correct - sadly, I copied that directly from the gitorious > site! > Geez :) They're both correct :) People who have push access should use: git clone git at gitorious.org:rspec/mainline.git People who are read-only should use: git clone git://gitorious.org/rspec/mainline.git From webs.dev at gmail.com Wed Feb 27 17:28:19 2008 From: webs.dev at gmail.com (greg weber) Date: Wed, 27 Feb 2008 16:28:19 -0600 Subject: [rspec-devel] [ANN] quicktest - an RSpec wrapper for in-lining tests In-Reply-To: References: Message-ID: I have released a newer, simpler version http://rubyforge.org/frs/download.php/33042/quicktest-0.3.2.gem Now there is only one (optional) parameter for a quicktest method (a Method Object) def quicktest it "should be of class Object" do self.should be_kind_of(Object) end end On Tue, Feb 26, 2008 at 6:56 AM, greg weber wrote: > == ABOUT > Quicktest is a utility for inlining ruby unit tests with the ruby code > under test > > The typical test driven development workflow requires constant switching > between the file containg the source code and the the file containg the > tests. When creating code, it can be more convenient to place tests > immediately after the code you are writing. After the code has been > written, it may be a good idea to move it to another file, but the option to > permanently keep tests with the source is available (useful for scripts). > > Quicktest is designed to support quick tests in a framework agnostic way. > Currently, only an rspec testrunner is available, but it is trivial to write > one for another testing framework. > > == FEATURES > Quicktest uses method tracing to know the method you are testing. By > default the output of a failed test will show the object and method name. > > == USAGE > To test a method, place another method called 'quicktest' immediately > after it > the quicktest method has three OPTIONAL arguments > - the test runner object > - a reference to self > - a method object for the method under test > > run with spec -r quicktest file_to_test > > There is a convenience script so that you can just run > > quickspec file_to_test > > == NOTES > - leaving test code in with your production code is not necessarily a good > idea, but there is almost no runtime overhead to doing so since ruby will > not evaluate code in a method until the method is invoked > - quicktest instance methods not working properly? if the class (or one of > its ancestors) is overriding method tracing than including QuickTest::Tracer > will fix it. > > > example: run with bin/quickspec > > class Foo > attr_reader :bar > > def initialize > @bar = true > end > def quicktest t, s > t.it "bar should be initialized to true" do > s.bar.should == true > end > end > > def self.hello arg > "hello" + arg > end > def self.quicktest t, s, meth > t.it "should prepend 'hello' to its argument" do > meth["world"].should == 'hello world' # error - no space > 'helloworld' > end > end > end > > > Running quicktest on the above outputs the following: > .F > > 1) > 'Foo hello should prepend 'hello' to its argument' FAILED > expected: "hello world", > got: "helloworld" (using ==) > ./README:22:in `quicktest' > /home/greg/quicktest/lib/quicktest.rb:65:in `instance_eval' > /home/greg/quicktest/lib/quicktest.rb:65:in `run_tests' > > Finished in 0.008338 seconds > > 2 examples, 1 failure > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/rspec-devel/attachments/20080227/516ffcbd/attachment-0001.html From pergesu at gmail.com Wed Feb 27 23:01:40 2008 From: pergesu at gmail.com (Pat Maddox) Date: Wed, 27 Feb 2008 20:01:40 -0800 Subject: [rspec-devel] Output Stripping out "a" characters? In-Reply-To: <29a0119e0802261149j2e1198eeq88bc54ce87ad0e8f@mail.gmail.com> References: <29a0119e0802261126td01ca02q93ae10b3b82a552b@mail.gmail.com> <57c63afe0802261136n38cad6fah7caee2f4a2260fcc@mail.gmail.com> <29a0119e0802261149j2e1198eeq88bc54ce87ad0e8f@mail.gmail.com> Message-ID: <810a540e0802272001w13d7568anf48feff3c41aa199@mail.gmail.com> On Tue, Feb 26, 2008 at 11:49 AM, Bryan Ray wrote: > Interesting ... if I remove the "--colour" option from the spec.opts it > works If only there were something that stripped out all those goofy u's Pat From dchelimsky at gmail.com Wed Feb 27 23:03:28 2008 From: dchelimsky at gmail.com (David Chelimsky) Date: Wed, 27 Feb 2008 22:03:28 -0600 Subject: [rspec-devel] Output Stripping out "a" characters? In-Reply-To: <810a540e0802272001w13d7568anf48feff3c41aa199@mail.gmail.com> References: <29a0119e0802261126td01ca02q93ae10b3b82a552b@mail.gmail.com> <57c63afe0802261136n38cad6fah7caee2f4a2260fcc@mail.gmail.com> <29a0119e0802261149j2e1198eeq88bc54ce87ad0e8f@mail.gmail.com> <810a540e0802272001w13d7568anf48feff3c41aa199@mail.gmail.com> Message-ID: <57c63afe0802272003l62dca380x36cfd3e59f9494b4@mail.gmail.com> On Wed, Feb 27, 2008 at 10:01 PM, Pat Maddox wrote: > On Tue, Feb 26, 2008 at 11:49 AM, Bryan Ray wrote: > > Interesting ... if I remove the "--colour" option from the spec.opts it > > works > > If only there were something that stripped out all those goofy u's :) From matt-lists at reprocessed.org Thu Feb 28 05:32:39 2008 From: matt-lists at reprocessed.org (Matt Patterson) Date: Thu, 28 Feb 2008 10:32:39 +0000 Subject: [rspec-devel] rake pre_commit Message-ID: Hello, I'm getting 7 failures from pre_commit core off a fresh checkout of the trunk. Is this expected behaviour? (They're all related to exit code status - http://pastie.caboo.se/ 158679) I'm running ruby 1.8.6, locally compiled, on a Mac OS X 10.4.11 intel box. Everything's pretty standard here... Thanks, Matt -- Matt Patterson | Design & Code | http://www.reprocessed.org/ From aslak.hellesoy at gmail.com Thu Feb 28 06:13:51 2008 From: aslak.hellesoy at gmail.com (aslak hellesoy) Date: Thu, 28 Feb 2008 12:13:51 +0100 Subject: [rspec-devel] rake pre_commit In-Reply-To: References: Message-ID: <8d961d900802280313x12e57befs5fa4b9a491961d25@mail.gmail.com> On Thu, Feb 28, 2008 at 11:32 AM, Matt Patterson wrote: > Hello, > > I'm getting 7 failures from pre_commit core off a fresh checkout of > the trunk. Is this expected behaviour? > Of course not :-) > (They're all related to exit code status - http://pastie.caboo.se/ > 158679) > I have seen this somewhere recently, but I don't think it's in Lighthouse yet. Can you add it please? http://rspec.lighthouseapp.com/ > I'm running ruby 1.8.6, locally compiled, on a Mac OS X 10.4.11 intel > box. Everything's pretty standard here... > That's the same as me, so I should be able to reproduce it... Aslak > Thanks, > > Matt > > -- > Matt Patterson | Design & Code > | http://www.reprocessed.org/ > > > _______________________________________________ > rspec-devel mailing list > rspec-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-devel > From matt-lists at reprocessed.org Thu Feb 28 07:33:19 2008 From: matt-lists at reprocessed.org (Matt Patterson) Date: Thu, 28 Feb 2008 12:33:19 +0000 Subject: [rspec-devel] rake pre_commit In-Reply-To: <8d961d900802280313x12e57befs5fa4b9a491961d25@mail.gmail.com> References: <8d961d900802280313x12e57befs5fa4b9a491961d25@mail.gmail.com> Message-ID: <4CB144A4-BC15-440B-ACB8-61AD4E9ED635@reprocessed.org> On 28 Feb 2008, at 11:13, aslak hellesoy wrote: > On Thu, Feb 28, 2008 at 11:32 AM, Matt Patterson > wrote: >> I'm getting 7 failures from pre_commit core off a fresh checkout of >> the trunk. Is this expected behaviour? >> > Of course not :-) Phew... > I have seen this somewhere recently, but I don't think it's in > Lighthouse yet. Can you add it please? > http://rspec.lighthouseapp.com/ http://rspec.lighthouseapp.com/projects/5645-rspec/tickets/315- failing-specs-and-stories-on-rake-pre_commit Matt -- Matt Patterson | Design & Code | http://www.reprocessed.org/ From hongli at plan99.net Thu Feb 28 15:19:17 2008 From: hongli at plan99.net (Hongli Lai) Date: Thu, 28 Feb 2008 21:19:17 +0100 Subject: [rspec-devel] [Patch] Nicer RDoc template Message-ID: <47C71745.2020407@plan99.net> Many people agree that the default RDoc template looks pretty horrible. With the attached, RSpec will use the 'Horo' RDoc template. I've uploaded a demo to: http://izumi.plan99.net/rspec-horo/ The RDoc documentation generated by RubyGems will also use this template. -------------- next part -------------- A non-text attachment was scrubbed... Name: rspec-rdoc-horo.diff Type: text/x-patch Size: 14112 bytes Desc: not available Url : http://rubyforge.org/pipermail/rspec-devel/attachments/20080228/7aa8bb1b/attachment.bin From dchelimsky at gmail.com Thu Feb 28 15:35:39 2008 From: dchelimsky at gmail.com (David Chelimsky) Date: Thu, 28 Feb 2008 14:35:39 -0600 Subject: [rspec-devel] [Patch] Nicer RDoc template In-Reply-To: <47C71745.2020407@plan99.net> References: <47C71745.2020407@plan99.net> Message-ID: <57c63afe0802281235w6d315f35we7f780b327f00650@mail.gmail.com> On Thu, Feb 28, 2008 at 2:19 PM, Hongli Lai wrote: > Many people agree that the default RDoc template looks pretty horrible. > With the attached, RSpec will use the 'Horo' RDoc template. I've > uploaded a demo to: http://izumi.plan99.net/rspec-horo/ > > The RDoc documentation generated by RubyGems will also use this template. Please submit patches to the tracker, not the list: http://rspec.lighthouseapp.com I'll be glad to implement this if you do. Thanks, David > > _______________________________________________ > rspec-devel mailing list > rspec-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-devel > From bryansray at gmail.com Thu Feb 28 20:47:26 2008 From: bryansray at gmail.com (Bryan Ray) Date: Thu, 28 Feb 2008 19:47:26 -0600 Subject: [rspec-devel] How you develop with git Message-ID: <29a0119e0802281747y4fdf151bt54f64b7511e3da49@mail.gmail.com> So I recently decided to start using git on my work and here's where I'm at ... my experience with svn kind of put a bad taste in my mouth when it came to branching / merging. I would rarely go through a merge (especially a big one) without having something screw up. So I'm wondering if anyone could give some quick scenarios (or point me to a resource) on how they do development (specifically Rails) with GIT. When you develop against your main repository is it customary to make "topic branches"? Or just make your changes and commit them to the "master" repo? I love the concept of branching / tagging / merging, but in SVN it's always been more of a pain than anything. Any feedback would be greatly appreciated. -- Bryan Ray http://www.bryanray.net "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/rspec-devel/attachments/20080228/c0e2f1e5/attachment.html From coreyhaines at gmail.com Thu Feb 28 21:17:34 2008 From: coreyhaines at gmail.com (Corey Haines) Date: Thu, 28 Feb 2008 21:17:34 -0500 Subject: [rspec-devel] How you develop with git In-Reply-To: <29a0119e0802281747y4fdf151bt54f64b7511e3da49@mail.gmail.com> References: <29a0119e0802281747y4fdf151bt54f64b7511e3da49@mail.gmail.com> Message-ID: <6bdacb70802281817s1aa4ecc7wc276eddf29b0843e@mail.gmail.com> Hi, Bryan, I'm just experimenting these days with DSCM, as well. A friend and I recorded a conversation that discussed my ideas and usages of DSCM (I'm using bazaar right now). It might be interesting. http://www.faithfulgeek.org/2008/2/24/distributed-source-control-with-corey-haines -Corey On Thu, Feb 28, 2008 at 8:47 PM, Bryan Ray wrote: > So I recently decided to start using git on my work and here's where I'm > at ... my experience with svn kind of put a bad taste in my mouth when it > came to branching / merging. I would rarely go through a merge (especially a > big one) without having something screw up. > > So I'm wondering if anyone could give some quick scenarios (or point me to > a resource) on how they do development (specifically Rails) with GIT. > > When you develop against your main repository is it customary to make > "topic branches"? Or just make your changes and commit them to the "master" > repo? > > I love the concept of branching / tagging / merging, but in SVN it's > always been more of a pain than anything. > > Any feedback would be greatly appreciated. > > -- > Bryan Ray > http://www.bryanray.net > > "Programming today is a race between software engineers striving to build > bigger and better idiot-proof programs, and the Universe trying to produce > bigger and better idiots. So far, the Universe is winning." > _______________________________________________ > rspec-devel mailing list > rspec-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-devel > -- http://www.coreyhaines.com The Internet's Premiere source of information about Corey Haines -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/rspec-devel/attachments/20080228/1cffba66/attachment.html From ivey at gweezlebur.com Thu Feb 28 21:57:13 2008 From: ivey at gweezlebur.com (Michael D. Ivey) Date: Thu, 28 Feb 2008 20:57:13 -0600 Subject: [rspec-devel] OFF-TOPIC: How you develop with git In-Reply-To: <29a0119e0802281747y4fdf151bt54f64b7511e3da49@mail.gmail.com> References: <29a0119e0802281747y4fdf151bt54f64b7511e3da49@mail.gmail.com> Message-ID: On Feb 28, 2008, at 7:47 PM, Bryan Ray wrote: > When you develop against your main repository is it customary to > make "topic branches"? Or just make your changes and commit them to > the "master" repo? Absolutely. Git branches are so cheap and easy that a lot of people make a new one for each feature, or change, or bugfix, or ticket. Some people also use "git commit --amend" to keep it to one commit per branch, so the merge history is cleaner. However, if you're the only dev, there may not be a lot of advantage to using them. They're there, they're easy if you want them. From hongli at plan99.net Fri Feb 29 06:07:32 2008 From: hongli at plan99.net (Hongli Lai) Date: Fri, 29 Feb 2008 12:07:32 +0100 Subject: [rspec-devel] How you develop with git In-Reply-To: <29a0119e0802281747y4fdf151bt54f64b7511e3da49@mail.gmail.com> References: <29a0119e0802281747y4fdf151bt54f64b7511e3da49@mail.gmail.com> Message-ID: <47C7E774.1030709@plan99.net> Bryan Ray wrote: > So I recently decided to start using git on my work and here's where I'm > at ... my experience with svn kind of put a bad taste in my mouth when > it came to branching / merging. I would rarely go through a merge > (especially a big one) without having something screw up. > > So I'm wondering if anyone could give some quick scenarios (or point me > to a resource) on how they do development (specifically Rails) with GIT. > > When you develop against your main repository is it customary to make > "topic branches"? Or just make your changes and commit them to the > "master" repo? > > I love the concept of branching / tagging / merging, but in SVN it's > always been more of a pain than anything. > > Any feedback would be greatly appreciated. I recently switched from Subversion to Git. I still do most things like I'm used to in Subversion, but when I'm about to make a big change, I make a topic branch. It's really easy in quick in Git, a branch is created in less than a second and it only takes you at most 2 commands. One doesn't even have to switch the working directory. Merging is also easy: it only takes one command, and unlike Subversion I don't have to manually remember which revisions I should be merging with. Branching and merging is definitely a lot easier. From matt-lists at reprocessed.org Fri Feb 29 14:08:26 2008 From: matt-lists at reprocessed.org (Matt Patterson) Date: Fri, 29 Feb 2008 19:08:26 +0000 Subject: [rspec-devel] Spec::Story::Runner.run_options Message-ID: <1DE8F96F-C30B-4257-BCA5-53C352E8668F@reprocessed.org> Hey there, I've been playing with doing clever(ish) reporting things by hooking custom formatters in which do stuff (in my case, generating rspec output linked to Scrum project management artefacts like Sprint and Product Backlogs). I'm looking at doing the same with Story Runner stories, but I was having real problems getting even the standard HTML story formatter to work. It turned out that this was because the spec/rails/story_adapter code requires, and triggers, rspec_options (through the RailsExampleGroup subclassing of Test::Unit::TestCase, which gets extended elsewhere). rspec_options consumes and clears ARGV, so by the time poor old run_options gets a look in, there's no ARGV left, so a default Spec::Runner::Options ends up being created. This is a problem for a couple of reasons. One, it's serious voodoo - it's the requiring, not explicit code running, that screws this up, and secondly, it only happens (AFAICT) when you require the Rails story adapter - vanilla non-rails Stories are fine (like, for instance, Story Runner's own specs...). I'm looking at ways to fix this, because it's clearly a problem. My first thought was that run_options was a bit non-DRY, because it's doing the same thing as rspec_options does. I decided to just use rspec_options in its place. In practice this works fine and clears up the problem (because the voodoo works for you). However, this makes it almost impossible to test - I got a cascading failure, with stuff breaking throughout the Story Runner specs. The way that kicking off option parsing, and making its results accessible, works is making me really nervous. Particularly, it feels like it shouldn't be this hard to test and work with. I don't know what other peoples thoughts are, but I'm seriously thinking about trying to come up with an alternate way. Would people be interested? Matt -- Matt Patterson | Design & Code | http://www.reprocessed.org/ From dchelimsky at gmail.com Fri Feb 29 16:51:44 2008 From: dchelimsky at gmail.com (David Chelimsky) Date: Fri, 29 Feb 2008 15:51:44 -0600 Subject: [rspec-devel] Spec::Story::Runner.run_options In-Reply-To: <1DE8F96F-C30B-4257-BCA5-53C352E8668F@reprocessed.org> References: <1DE8F96F-C30B-4257-BCA5-53C352E8668F@reprocessed.org> Message-ID: <57c63afe0802291351l701de8a9m75476ca50c6c5f4c@mail.gmail.com> On Fri, Feb 29, 2008 at 1:08 PM, Matt Patterson wrote: > Hey there, > > I've been playing with doing clever(ish) reporting things by hooking > custom formatters in which do stuff (in my case, generating rspec > output linked to Scrum project management artefacts like Sprint and > Product Backlogs). > > I'm looking at doing the same with Story Runner stories, but I was > having real problems getting even the standard HTML story formatter > to work. > > It turned out that this was because the spec/rails/story_adapter code > requires, and triggers, rspec_options (through the RailsExampleGroup > subclassing of Test::Unit::TestCase, which gets extended elsewhere). > rspec_options consumes and clears ARGV, so by the time poor old > run_options gets a look in, there's no ARGV left, so a default > Spec::Runner::Options ends up being created. > > This is a problem for a couple of reasons. One, it's serious voodoo - > it's the requiring, not explicit code running, that screws this up, > and secondly, it only happens (AFAICT) when you require the Rails > story adapter - vanilla non-rails Stories are fine (like, for > instance, Story Runner's own specs...). > > I'm looking at ways to fix this, because it's clearly a problem. My > first thought was that run_options was a bit non-DRY, Definitely. This is something we recognized when we merged the story runner into rspec. We just haven't had the cycles to address it. > because it's > doing the same thing as rspec_options does. I decided to just use > rspec_options in its place. In practice this works fine and clears up > the problem (because the voodoo works for you). However, this makes > it almost impossible to test - I got a cascading failure, with stuff > breaking throughout the Story Runner specs. > > The way that kicking off option parsing, and making its results > accessible, works is making me really nervous. Particularly, it feels > like it shouldn't be this hard to test and work with. > > I don't know what other peoples thoughts are, but I'm seriously > thinking about trying to come up with an alternate way. Would people > be interested? Very interested in discussing. The existing set up evolved because it made it dirt simple to spec out the option parsing itself, but the cost we ended up with is that everything else is a challenge :) Please do start a ticket at lighthouse and we can discuss approaches and decisions there. Cheers, David > > Matt > > -- > Matt Patterson | Design & Code > | http://www.reprocessed.org/ > > > _______________________________________________ > rspec-devel mailing list > rspec-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-devel >