aslak hellesoy
2007-Apr-04 16:33 UTC
[rspec-users] ANN: RSpec 0.9.0 beta-1 available for download.
We''d like to get some feedback on RSpec 0.9 before we start pushing out releases via Rubyforge''s gem server and update the website. We have therefore made the first beta of 0.9 available - both prepackaged and tagged in subversion (see below). RSpec 0.9 introduces a new API for expectations, which essentially means that your underscores go away (there has been other discussions on the lists about this). In addition to this, you can say describe/it instead of context/specify. We believe this will lead to even more readable - and well-written specs. (context/specify will still be supported for a while). == Translator =In order to ease the transition from 0.8 to 0.9, we have included a tool to translate your 0.8 style specs to 0.9 style. After installing the 0.9 gem, you should run: spec_translator path_to_my_spec_dir path_to_my_translated_spec_dir (or alternatively, if you have your code under version control and can do a revert if things go wrong:) spec_translator path_to_my_spec_dir path_to_my_spec_dir (This will translate your specs in-place) == Where to get it = RSpec core is available here: * http://rspec.rubyforge.org/rspec-0.9.0.gem * http://rspec.rubyforge.org/rspec-0.9.0.tgz * http://rspec.rubyforge.org/rspec-0.9.0.zip * http://rspec.rubyforge.org/RSpec-0.9.0.tmbundle.tgz == Rails users =For those of you who want to install 0.9 beta as plugins, the svn URLs are: * svn://rubyforge.org/var/svn/rspec/tags/REL_0_9_0_BETA_1/rspec * svn://rubyforge.org/var/svn/rspec/tags/REL_0_9_0_BETA_1/rspec_on_rails (Don''t forget to do do a "script generate rspec" to update your local files) Cheers, Aslak
Michael Trier
2007-Apr-04 16:53 UTC
[rspec-users] ANN: RSpec 0.9.0 beta-1 available for download.
Thanks Aslak, David, and the rest of the team. Nice work. Michael On Apr 4, 2007, at 12:33 PM, aslak hellesoy wrote:> We''d like to get some feedback on RSpec 0.9 before we start pushing > out releases via Rubyforge''s gem server and update the website. We > have therefore made the first beta of 0.9 available - both prepackaged > and tagged in subversion (see below). > > RSpec 0.9 introduces a new API for expectations, which essentially > means that your underscores go away (there has been other discussions > on the lists about this). In addition to this, you can say describe/it > instead of context/specify. We believe this will lead to even more > readable - and well-written specs. (context/specify will still be > supported for a while). > > == Translator => In order to ease the transition from 0.8 to 0.9, we have included a > tool to translate your 0.8 style specs to 0.9 style. After installing > the 0.9 gem, you should run: > > spec_translator path_to_my_spec_dir path_to_my_translated_spec_dir > > (or alternatively, if you have your code under version control and can > do a revert if things go wrong:) > > spec_translator path_to_my_spec_dir path_to_my_spec_dir > > (This will translate your specs in-place) > > == Where to get it => > RSpec core is available here: > > * http://rspec.rubyforge.org/rspec-0.9.0.gem > * http://rspec.rubyforge.org/rspec-0.9.0.tgz > * http://rspec.rubyforge.org/rspec-0.9.0.zip > * http://rspec.rubyforge.org/RSpec-0.9.0.tmbundle.tgz > > == Rails users => For those of you who want to install 0.9 beta as plugins, the svn > URLs are: > * svn://rubyforge.org/var/svn/rspec/tags/REL_0_9_0_BETA_1/rspec > * svn://rubyforge.org/var/svn/rspec/tags/REL_0_9_0_BETA_1/ > rspec_on_rails > > (Don''t forget to do do a "script generate rspec" to update your > local files) > > Cheers, > Aslak > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users
David Chelimsky
2007-Apr-04 18:16 UTC
[rspec-users] [rspec-devel] ANN: RSpec 0.9.0 beta-1 available for download.
On 4/4/07, aslak hellesoy <aslak.hellesoy at gmail.com> wrote:> We''d like to get some feedback on RSpec 0.9 before we start pushing > out releases via Rubyforge''s gem server and update the website. We > have therefore made the first beta of 0.9 available - both prepackaged > and tagged in subversion (see below). > > RSpec 0.9 introduces a new API for expectations, which essentially > means that your underscores go away (there has been other discussions > on the lists about this). In addition to this, you can say describe/it > instead of context/specify. We believe this will lead to even more > readable - and well-written specs. (context/specify will still be > supported for a while). > > == Translator => In order to ease the transition from 0.8 to 0.9, we have included a > tool to translate your 0.8 style specs to 0.9 style. After installing > the 0.9 gem, you should run: > > spec_translator path_to_my_spec_dir path_to_my_translated_spec_dir > > (or alternatively, if you have your code under version control and can > do a revert if things go wrong:) > > spec_translator path_to_my_spec_dir path_to_my_spec_dir > > (This will translate your specs in-place) > > == Where to get it => > RSpec core is available here: > > * http://rspec.rubyforge.org/rspec-0.9.0.gem > * http://rspec.rubyforge.org/rspec-0.9.0.tgz > * http://rspec.rubyforge.org/rspec-0.9.0.zip > * http://rspec.rubyforge.org/RSpec-0.9.0.tmbundle.tgz > > == Rails users => For those of you who want to install 0.9 beta as plugins, the svn URLs are: > * svn://rubyforge.org/var/svn/rspec/tags/REL_0_9_0_BETA_1/rspec > * svn://rubyforge.org/var/svn/rspec/tags/REL_0_9_0_BETA_1/rspec_on_rails > > (Don''t forget to do do a "script generate rspec" to update your local files)Since we haven''t updated the website yet you can''t see the change log w/o downloading it - here''s some of what it has to say: * Sugar FREE! * Fixed [#6523] Run rspec on rails without a db * Fixed [#9295] rake spec should run anything in the spec directory (not just rspec''s standard dirs) * Added [#9786] infer controller and helper names from the described type * Fixed [#7795] form_tag renders action=''/view_spec'' in view specs * Fixed [#9767] rspec_on_rails should not define rescue_action on controllers * Fixed [#9421] --line doesn''t work with behaviours that use class names * Fixed [#9760] rspec generators incompatible with changes to edge rails * Added [#9786] infer controller and helper names from the described type * Applied a simplified version of [#9282] Change to allow running specs from textmate with rspec installed as a rails plugin (and no rspec gem installed) * Applied [#9700] Make Spec::DSL::Example#name public / Add a --timeout switch. A great way to prevent specs from getting slow. * In Rails, script/generate rspec will generate a spec.opts file that optimises faster/more efficient running of specs. * Added [#9522] support using rspec''s expectations with test/unit * Moved rspec_on_rails up to the project root, simplifying the download url * Fixed [#8103] RSpec not installing spec script correctly. * The --spec option is replaced by the --example option. * The --loadby option no longer supports a file argument. Use --example file_name instead. * The --example option can now take a file name as an argument. The file should contain example names. * New --failures option which will write out a file that can later be used with --example. * Internal classes are named Behaviour/Example (rather than Context/Specification). * You can now use mocha by saying config.mock_with :mocha in a spec_helper * before_context_eval is replaced by before_eval. * Applied [#9509] allow spaced options in spec.opts * Applied [#9510] Added File for Ruby 1.8.6 * Applied [#9511] Clarification to README file in spec/ * Moved all of the Spec::Rails specs down to the plugins directory - now you can run the specs after you install. * Updated RSpec.tmbundle to the 0.9 syntax and replaced context/specify with describe/it. * Applied [#9232] ActionController::Base#render is sometimes protected (patch from Dan Manges) * Added --reverse option, allowing contexts/specs to be run in reverse order. * Added --loadby option, allowing better control over load order for spec files. mtime and file.txt supported. * Implemented [#8696] --order option (see --reverse and --loadby) * Added describe/it as aliases for context/specify - suggestion from Dan North. * Applied [#7637] [PATCH] add skip-migration option to rspec_resource generator * Added [#9167] string.should have_tag * Changed script/rails_spec_server to script/spec_server and added script/spec (w/ path to vendor/plugins/rspec) * Fixed [#8897] Error when mixing controller spec with/without integrated views and using template system other than rhtml * Updated sample app specs to 0.9 syntax * Updated generated specs to 0.9 syntax * Applied [#8994] trunk: generated names for be_ specs (Multiple patches from Yurii Rashkovskii) I''ve been blogging about some of the new features, and will continue to do so. Aslak and Dave also blog about rspec features from time to time so check their blogs out as well: http://blog.davidchelimsky.net/ http://blog.aslakhellesoy.com/ http://blog.daveastels.com/ Cheers, David> > Cheers, > Aslak > _______________________________________________ > rspec-devel mailing list > rspec-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-devel >
Wincent Colaiuta
2007-Apr-05 15:34 UTC
[rspec-users] ANN: RSpec 0.9.0 beta-1 available for download.
El 4/4/2007, a las 18:33, aslak hellesoy escribi?:> RSpec 0.9 introduces a new API for expectations, which essentially > means that your underscores go awayCan you please give an example of what this looks like? I''ve looked at the various "dot vs underscore" discussions on the lists so I''m interested to see what the new style is. Cheers, Wincent
Roberto Soares
2007-Apr-05 16:56 UTC
[rspec-users] ANN: RSpec 0.9.0 beta-1 available for download.
from: rspec/examples/stack_spec.rb require File.dirname(__FILE__) + ''/spec_helper'' require File.dirname(__FILE__) + "/stack" describe Stack do setup do @stack = Stack.new ["a","b","c"].each { |x| @stack.push x } end it "should add to the top when sent #push" do @stack.push "d" @stack.peek.should == "d" end it "should return the top item when sent #peek" do @stack.peek.should == "c" end it "should NOT remove the top item when sent #peek" do @stack.peek.should == "c" @stack.peek.should == "c" end it "should return the top item when sent #pop" do @stack.pop.should == "c" end it "should remove the top item when sent #pop" do @stack.pop.should == "c" @stack.pop.should == "b" end end describe Stack, " (empty)" do setup do @stack = Stack.new end # NOTE that this one auto-generates the description "should be empty" specify { @stack.should be_empty } it "should no longer be empty after #push" do @stack.push "anything" @stack.should_not be_empty end it "should complain when sent #peek" do lambda { @stack.peek }.should raise_error(StackUnderflowError) end it "should complain when sent #pop" do lambda { @stack.pop }.should raise_error(StackUnderflowError) end end describe Stack, " (with one item)" do setup do @stack = Stack.new @stack.push 3 end # NOTE that this one auto-generates the description "should not be empty" specify { @stack.should_not be_empty } it "should remain not empty after #peek" do @stack.peek @stack.should_not be_empty end it "should become empty after #pop" do @stack.pop @stack.should be_empty end end describe Stack, " (with one item less than capacity)" do setup do @stack = Stack.new (1..9).each { |i| @stack.push i } end # NOTE that this one auto-generates the description "should not be full" specify { @stack.should_not be_full } it "should become full after #push" do @stack.push Object.new @stack.should be_full end end describe Stack, " (full)" do setup do @stack = Stack.new (1..10).each { |i| @stack.push i } end # NOTE that this one auto-generates the description "should be full" it { @stack.should be_full } it "should remain full after #peek" do @stack.peek @stack.should be_full end it "should no longer be full after #pop" do @stack.pop @stack.should_not be_full end it "should complain on #push" do lambda { @stack.push Object.new }.should raise_error(StackOverflowError) end end On 4/5/07, Wincent Colaiuta <win at wincent.com> wrote:> > El 4/4/2007, a las 18:33, aslak hellesoy escribi?: > > > RSpec 0.9 introduces a new API for expectations, which essentially > > means that your underscores go away > > Can you please give an example of what this looks like? I''ve looked > at the various "dot vs underscore" discussions on the lists so I''m > interested to see what the new style is. > > Cheers, > Wincent > > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users >-- Roberto Soares Diretor de P&D da Techmobil http://roberto.techmobil.com.br 73 8105-4337 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/rspec-users/attachments/20070405/e7eb20c5/attachment-0001.html
David Chelimsky
2007-Apr-05 17:01 UTC
[rspec-users] ANN: RSpec 0.9.0 beta-1 available for download.
On 4/5/07, Wincent Colaiuta <win at wincent.com> wrote:> El 4/4/2007, a las 18:33, aslak hellesoy escribi?: > > > RSpec 0.9 introduces a new API for expectations, which essentially > > means that your underscores go away > > Can you please give an example of what this looks like? I''ve looked > at the various "dot vs underscore" discussions on the lists so I''m > interested to see what the new style is.Instead of this: actual.should_equal(expected) team.should_have(3).players 5.should_be < 7 you say this: actual.should equal(expected) team.should have(3).players 5.should be < 7> > Cheers, > Wincent > > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users >
Wincent Colaiuta
2007-Apr-05 18:09 UTC
[rspec-users] ANN: RSpec 0.9.0 beta-1 available for download.
El 4/4/2007, a las 18:33, aslak hellesoy escribi?:> In order to ease the transition from 0.8 to 0.9, we have included a > tool to translate your 0.8 style specs to 0.9 style.The included translator did a pretty good job on a fairly large project ("svn diff" on the working copy after the translation yielded over 3,000 lines of diffs) with only a few minor issues for which I''ll paste in samples. (Tried to post this to the RubyForge issue tracker but I can''t stay logged in long enough to open the ticket because of an invisible anonymous proxy in place thanks to my ISP...) Whitespace between specs and comments eaten: - lambda { @instance.foo = foo }.should_raise NoMethodError # no writer defined + lambda { @instance.foo = foo }.should raise_error (NoMethodError)# no writer defined Incorrect parentheses around method invocations with parameters: - AndPredicate.new(''foo'').should_eql AndPredicate.new(''foo'') + AndPredicate.new(''foo'').should eql(AndPredicate.new)(''foo'') Unnecessary parens: - Node.subclass(''FooNode'').should_not_be_nil + Node.subclass(''FooNode'').should_not be_nil() Missing parentheses, yields "parenthesize argument(s) for future version" warnings when running specs: - lambda { sequence.parse (''bar'') }.should_throw :ZeroWidthParseSuccess + lambda { sequence.parse(''bar'') }.should throw_symbol :ZeroWidthParseSuccess Another example: - @parslet.should_eql @parslet.clone + @parslet.should eql @parslet.clone Another case of misplaced parens: - @parslet.should_not_eql lambda { nil }.to_parseable + @parslet.should_not eql(lambda){ nil }.to_parseable Another: - results.should_be_kind_of SimpleASTLanguage::Identifier + results.should be_kind_of(SimpleASTLanguage)::Identifier Apart from that, no major issues. All specs continued to pass after 0.90, and the updated TextMate bundle works brilliantly. Cheers, Wincent
David Chelimsky
2007-Apr-05 18:45 UTC
[rspec-users] ANN: RSpec 0.9.0 beta-1 available for download.
On 4/5/07, Wincent Colaiuta <win at wincent.com> wrote:> El 4/4/2007, a las 18:33, aslak hellesoy escribi?: > > > In order to ease the transition from 0.8 to 0.9, we have included a > > tool to translate your 0.8 style specs to 0.9 style. > > The included translator did a pretty good job on a fairly large > project ("svn diff" on the working copy after the translation yielded > over 3,000 lines of diffs) with only a few minor issues for which > I''ll paste in samples. (Tried to post this to the RubyForge issue > tracker but I can''t stay logged in long enough to open the ticket > because of an invisible anonymous proxy in place thanks to my ISP...) > > > Whitespace between specs and comments eaten: > > - lambda { @instance.foo = foo }.should_raise NoMethodError # no > writer defined > + lambda { @instance.foo = foo }.should raise_error > (NoMethodError)# no writer defined > > > Incorrect parentheses around method invocations with parameters: > > - AndPredicate.new(''foo'').should_eql AndPredicate.new(''foo'') > + AndPredicate.new(''foo'').should eql(AndPredicate.new)(''foo'') > > > Unnecessary parens: > > - Node.subclass(''FooNode'').should_not_be_nil > + Node.subclass(''FooNode'').should_not be_nil() > > > Missing parentheses, yields "parenthesize argument(s) for future > version" warnings when running specs: > > - lambda { sequence.parse > (''bar'') }.should_throw :ZeroWidthParseSuccess > + lambda { sequence.parse(''bar'') }.should > throw_symbol :ZeroWidthParseSuccess > > > Another example: > > - @parslet.should_eql @parslet.clone > + @parslet.should eql @parslet.clone > > > Another case of misplaced parens: > > - @parslet.should_not_eql lambda { nil }.to_parseable > + @parslet.should_not eql(lambda){ nil }.to_parseable > > > Another: > > - results.should_be_kind_of SimpleASTLanguage::Identifier > + results.should be_kind_of(SimpleASTLanguage)::Identifier > > > Apart from that, no major issues. All specs continued to pass after > 0.90, and the updated TextMate bundle works brilliantly. > > Cheers, > WincentGreat feedback - thank you Wincent. I''ve added this to the tracker: http://rubyforge.org/tracker/index.php?func=detail&aid=9882&group_id=797&atid=3149 Cheers, David> > > > > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users >
Scott Taylor
2007-Apr-05 21:31 UTC
[rspec-users] ANN: RSpec 0.9.0 beta-1 available for download.
When are you going to convert trunk to 0.9? Do you more-or-less have a time frame? (I understand these things are set in stone). In the mean time, should I be patching against trunk, or is there a convenient way to patch against 0.9 right now? Best, Scott On Apr 4, 2007, at 12:33 PM, aslak hellesoy wrote:> We''d like to get some feedback on RSpec 0.9 before we start pushing > out releases via Rubyforge''s gem server and update the website. We > have therefore made the first beta of 0.9 available - both prepackaged > and tagged in subversion (see below). > > RSpec 0.9 introduces a new API for expectations, which essentially > means that your underscores go away (there has been other discussions > on the lists about this). In addition to this, you can say describe/it > instead of context/specify. We believe this will lead to even more > readable - and well-written specs. (context/specify will still be > supported for a while). > > == Translator => In order to ease the transition from 0.8 to 0.9, we have included a > tool to translate your 0.8 style specs to 0.9 style. After installing > the 0.9 gem, you should run: > > spec_translator path_to_my_spec_dir path_to_my_translated_spec_dir > > (or alternatively, if you have your code under version control and can > do a revert if things go wrong:) > > spec_translator path_to_my_spec_dir path_to_my_spec_dir > > (This will translate your specs in-place) > > == Where to get it => > RSpec core is available here: > > * http://rspec.rubyforge.org/rspec-0.9.0.gem > * http://rspec.rubyforge.org/rspec-0.9.0.tgz > * http://rspec.rubyforge.org/rspec-0.9.0.zip > * http://rspec.rubyforge.org/RSpec-0.9.0.tmbundle.tgz > > == Rails users => For those of you who want to install 0.9 beta as plugins, the svn > URLs are: > * svn://rubyforge.org/var/svn/rspec/tags/REL_0_9_0_BETA_1/rspec > * svn://rubyforge.org/var/svn/rspec/tags/REL_0_9_0_BETA_1/ > rspec_on_rails > > (Don''t forget to do do a "script generate rspec" to update your > local files) > > Cheers, > Aslak > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users
s.ross
2007-Apr-06 20:04 UTC
[rspec-users] ANN: RSpec 0.9.0 beta-1 available for download.
spec_translator does a good job with recent specs, but ones written in the more sugary days still require a bit more editing. E.g., foo.should.be.valid Not translated as: foo.should be_valid and foo.should.not.be.valid Not translated as: foo.should_not be_valid Also, changes to semantics of "be" make: foo.should be(true) fail, where: foo.should ==(true) succeeds. Some of this may be bad practice on my part. WDYT? On Apr 4, 2007, at 9:33 AM, aslak hellesoy wrote:> We''d like to get some feedback on RSpec 0.9 before we start pushing > out releases via Rubyforge''s gem server and update the website. We > have therefore made the first beta of 0.9 available - both prepackaged > and tagged in subversion (see below). > > RSpec 0.9 introduces a new API for expectations, which essentially > means that your underscores go away (there has been other discussions > on the lists about this). In addition to this, you can say describe/it > instead of context/specify. We believe this will lead to even more > readable - and well-written specs. (context/specify will still be > supported for a while). > > == Translator => In order to ease the transition from 0.8 to 0.9, we have included a > tool to translate your 0.8 style specs to 0.9 style. After installing > the 0.9 gem, you should run: > > spec_translator path_to_my_spec_dir path_to_my_translated_spec_dir > > (or alternatively, if you have your code under version control and can > do a revert if things go wrong:) > > spec_translator path_to_my_spec_dir path_to_my_spec_dir > > (This will translate your specs in-place) > > == Where to get it => > RSpec core is available here: > > * http://rspec.rubyforge.org/rspec-0.9.0.gem > * http://rspec.rubyforge.org/rspec-0.9.0.tgz > * http://rspec.rubyforge.org/rspec-0.9.0.zip > * http://rspec.rubyforge.org/RSpec-0.9.0.tmbundle.tgz > > == Rails users => For those of you who want to install 0.9 beta as plugins, the svn > URLs are: > * svn://rubyforge.org/var/svn/rspec/tags/REL_0_9_0_BETA_1/rspec > * svn://rubyforge.org/var/svn/rspec/tags/REL_0_9_0_BETA_1/ > rspec_on_rails > > (Don''t forget to do do a "script generate rspec" to update your > local files) > > Cheers, > Aslak > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users
David Chelimsky
2007-Apr-06 21:56 UTC
[rspec-users] ANN: RSpec 0.9.0 beta-1 available for download.
On 4/5/07, Scott Taylor <mailing_lists at railsnewbie.com> wrote:> > When are you going to convert trunk to 0.9? Do you more-or-less have > a time frame? (I understand these things are set in stone). > > In the mean time, should I be patching against trunk, or is there a > convenient way to patch against 0.9 right now? > > Best, > > ScottI emailed about this a couple of times yesterday. The trunk is NOW 0.9, so you should be patching the trunk. Thanks, David> > > > On Apr 4, 2007, at 12:33 PM, aslak hellesoy wrote: > > > We''d like to get some feedback on RSpec 0.9 before we start pushing > > out releases via Rubyforge''s gem server and update the website. We > > have therefore made the first beta of 0.9 available - both prepackaged > > and tagged in subversion (see below). > > > > RSpec 0.9 introduces a new API for expectations, which essentially > > means that your underscores go away (there has been other discussions > > on the lists about this). In addition to this, you can say describe/it > > instead of context/specify. We believe this will lead to even more > > readable - and well-written specs. (context/specify will still be > > supported for a while). > > > > == Translator => > In order to ease the transition from 0.8 to 0.9, we have included a > > tool to translate your 0.8 style specs to 0.9 style. After installing > > the 0.9 gem, you should run: > > > > spec_translator path_to_my_spec_dir path_to_my_translated_spec_dir > > > > (or alternatively, if you have your code under version control and can > > do a revert if things go wrong:) > > > > spec_translator path_to_my_spec_dir path_to_my_spec_dir > > > > (This will translate your specs in-place) > > > > == Where to get it => > > > RSpec core is available here: > > > > * http://rspec.rubyforge.org/rspec-0.9.0.gem > > * http://rspec.rubyforge.org/rspec-0.9.0.tgz > > * http://rspec.rubyforge.org/rspec-0.9.0.zip > > * http://rspec.rubyforge.org/RSpec-0.9.0.tmbundle.tgz > > > > == Rails users => > For those of you who want to install 0.9 beta as plugins, the svn > > URLs are: > > * svn://rubyforge.org/var/svn/rspec/tags/REL_0_9_0_BETA_1/rspec > > * svn://rubyforge.org/var/svn/rspec/tags/REL_0_9_0_BETA_1/ > > rspec_on_rails > > > > (Don''t forget to do do a "script generate rspec" to update your > > local files) > > > > Cheers, > > Aslak > > _______________________________________________ > > rspec-users mailing list > > rspec-users at rubyforge.org > > http://rubyforge.org/mailman/listinfo/rspec-users > > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users >
David Chelimsky
2007-Apr-06 22:07 UTC
[rspec-users] ANN: RSpec 0.9.0 beta-1 available for download.
On 4/6/07, s.ross <cwdinfo at gmail.com> wrote:> spec_translator does a good job with recent specs, but ones written > in the more sugary days still require a bit more editing. E.g., > > foo.should.be.valid > > Not translated as: > > foo.should be_valid > > and > > foo.should.not.be.valid > > Not translated as: > > foo.should_not be_validSugar == underscores instead of dots, so that''s actually pre-sugar. We officially ended support for dots way back on 8/9/2006 when we released RSpec 0.6.0. If that syntax is still working with 0.8 it is not intentional. There is no plan to support this w/ the translator.> > Also, changes to semantics of "be" make: > > foo.should be(true) > > fail, where: > > foo.should ==(true) > > succeeds.The translator should convert this: foo.should be(true) to this: foo.should equal(true) If it''s not doing that it''s definitely a bug, in which case please report it to the tracker. FYI - In 0.9 you can write either equal(true) or be_true, but the translator uses the former. Thanks, David