Brian Takita
2007-Nov-26 00:20 UTC
[rspec-users] Renaming RailsExample to RailsExampleGroup
Fyi, I made the following renames: * RailsExample -> RailsExampleGroup * FunctionalExample -> FunctionalExampleGroup * ControllerExample -> ControllerExampleGroup * ViewExample -> ViewExampleGroup * HelperExample -> HelperExampleGroup * ModelExample -> ModelExampleGroup This was done to keep the naming consistent with ExampleGroup.
Just seven upped the latest rspec update, and suddenly all my be_matchers don''t work anymore (they worked just before I updated): User.find_by_email(email).should_not be_confirmed User.find_by_email(email).confirmation_code.should_not be_nil >> FAILURES: 1) confirmation (Receives confirmation link) FAILED NoMethodError: undefined method `be_nil'' for #<ActionController::Integration::Session:0x31bb7d4> 3) confirmation (Clicks correct confirmation link) FAILED NoMethodError: undefined method `be_confirmed'' for #<ActionController::Integration::Session:0x3196ce0> Anyone else getting that? Daniel
On 11/26/07, Daniel Tenner <daniel.ruby at tenner.org> wrote:> Just seven upped the latest rspec update, and suddenly all my > be_matchers don''t work anymore (they worked just before I updated):<snip />> Anyone else getting that?All of my controller specs are passing, but my stories are failing with the same error. This works: response.success?.should == true This doesn''t: response.should be_success -- Josh Knowles phone: 509-979-1593 email: joshknowles at gmail.com web: http://joshknowles.com
On Nov 26, 2007 11:57 AM, Josh Knowles <joshknowles at gmail.com> wrote:> On 11/26/07, Daniel Tenner <daniel.ruby at tenner.org> wrote: > > Just seven upped the latest rspec update, and suddenly all my > > be_matchers don''t work anymore (they worked just before I updated): > > <snip /> > > > Anyone else getting that? > > All of my controller specs are passing, but my stories are failing > with the same error. > > This works: > response.success?.should == true > > This doesn''t: > response.should be_successActually I''m surprised these were ever working as RailsStory doesn''t include Spec::Matchers - just Spec::Rails::Matchers. The matchers must have been making their way in through the back door. I won''t have time to look at this until tonight, but feel free to submit a patch in the mean time if you can figure it out. Cheers, David> > -- > Josh Knowles > phone: 509-979-1593 > email: joshknowles at gmail.com > web: http://joshknowles.com > > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users >
First time I have a look inside the RSpec codebase (let alone the Story Runner), and not much luck this time. But, counter-intuitively enough, I think it''s probably nothing to do with RailsStory itself since that didn''t change in the last update. Trying to add an include Spec::Matchers in there also didn''t help. Couldn''t quite figure it out though. Too much to absorb in a single sitting. I''d love to know what it was when someone figures it out though. Daniel On 26 Nov 2007, at 18:27 26 Nov 2007, David Chelimsky wrote:> On Nov 26, 2007 11:57 AM, Josh Knowles <joshknowles at gmail.com> wrote: >> On 11/26/07, Daniel Tenner <daniel.ruby at tenner.org> wrote: >>> Just seven upped the latest rspec update, and suddenly all my >>> be_matchers don''t work anymore (they worked just before I updated): >> >> <snip /> >> >>> Anyone else getting that? >> >> All of my controller specs are passing, but my stories are failing >> with the same error. >> >> This works: >> response.success?.should == true >> >> This doesn''t: >> response.should be_success > > Actually I''m surprised these were ever working as RailsStory doesn''t > include Spec::Matchers - just Spec::Rails::Matchers. The matchers must > have been making their way in through the back door. > > I won''t have time to look at this until tonight, but feel free to > submit a patch in the mean time if you can figure it out. > > Cheers, > David > >> >> -- >> Josh Knowles >> phone: 509-979-1593 >> email: joshknowles at gmail.com >> web: http://joshknowles.com >> >> _______________________________________________ >> 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
These are the files that got modified in between. Revision 2994 has the matchers working. Reversing to 2994 highlighted these files: danieltenner at danbook:~/Sites/xxx.local/xxx/rails/trunk/vendor/plugins/ rspec$ svn up -r 2995 D stories/example_groups/nested_groups D stories/resources/spec/nested_group_spec.rb U stories/resources/steps/running_rspec.rb Updated to revision 2995. danieltenner at danbook:~/Sites/xxx.local/xxx/rails/trunk/vendor/plugins/ rspec$ cd .. danieltenner at danbook:~/Sites/xxx.local/xxx/rails/trunk/vendor/plugins $ cd rspec_on_rails/ danieltenner at danbook:~/Sites/xxx.local/xxx/rails/trunk/vendor/plugins/ rspec_on_rails$ svn up -r 2995 At revision 2995. danieltenner at danbook:~/Sites/xxx.local/xxx/rails/trunk/vendor/plugins/ rspec_on_rails$ svn up -r 2994 U lib/spec/rails/version.rb A lib/spec/rails/example/behaviour/functional_example.rb A lib/spec/rails/example/behaviour/controller_example.rb U lib/spec/rails/example/behaviour/rails_example_group.rb A lib/spec/rails/example/behaviour/rails_example.rb A lib/spec/rails/example/behaviour/view_example.rb A lib/spec/rails/example/behaviour/helper_example.rb A lib/spec/rails/example/behaviour/model_example.rb Updated to revision 2994. danieltenner at danbook:~/Sites/xxx.local/xxx/rails/trunk/vendor/plugins/ rspec_on_rails$ cd ../rspec danieltenner at danbook:~/Sites/xxx.local/xxx/rails/trunk/vendor/plugins/ rspec$ svn up -r 2994 U stories/resources/test/test_case_with_should_methods.rb U stories/resources/test/spec_and_test_together.rb D lib/spec/interop/test/unit/testcase.rb A lib/spec/interop/test/unit/example_group.rb U lib/spec/interop/test.rb U lib/spec/version.rb U lib/spec.rb Updated to revision 2994. After svn-down-ing to 2994, be_nil works in my stories again. Hope this helps someone :-) Daniel On 26 Nov 2007, at 19:09 26 Nov 2007, Daniel Tenner wrote:> First time I have a look inside the RSpec codebase (let alone the > Story Runner), and not much luck this time. But, counter-intuitively > enough, I think it''s probably nothing to do with RailsStory itself > since that didn''t change in the last update. Trying to add an include > Spec::Matchers in there also didn''t help. > > Couldn''t quite figure it out though. Too much to absorb in a single > sitting. > > I''d love to know what it was when someone figures it out though. > > Daniel > > On 26 Nov 2007, at 18:27 26 Nov 2007, David Chelimsky wrote: > >> On Nov 26, 2007 11:57 AM, Josh Knowles <joshknowles at gmail.com> wrote: >>> On 11/26/07, Daniel Tenner <daniel.ruby at tenner.org> wrote: >>>> Just seven upped the latest rspec update, and suddenly all my >>>> be_matchers don''t work anymore (they worked just before I updated): >>> >>> <snip /> >>> >>>> Anyone else getting that? >>> >>> All of my controller specs are passing, but my stories are failing >>> with the same error. >>> >>> This works: >>> response.success?.should == true >>> >>> This doesn''t: >>> response.should be_success >> >> Actually I''m surprised these were ever working as RailsStory doesn''t >> include Spec::Matchers - just Spec::Rails::Matchers. The matchers >> must >> have been making their way in through the back door. >> >> I won''t have time to look at this until tonight, but feel free to >> submit a patch in the mean time if you can figure it out. >> >> Cheers, >> David >> >>> >>> -- >>> Josh Knowles >>> phone: 509-979-1593 >>> email: joshknowles at gmail.com >>> web: http://joshknowles.com >>> >>> _______________________________________________ >>> 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 > > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users
On Nov 26, 2007 1:09 PM, Daniel Tenner <daniel.ruby at tenner.org> wrote:> First time I have a look inside the RSpec codebase (let alone the > Story Runner), and not much luck this time. But, counter-intuitively > enough, I think it''s probably nothing to do with RailsStory itself > since that didn''t change in the last update. Trying to add an include > Spec::Matchers in there also didn''t help. > > Couldn''t quite figure it out though. Too much to absorb in a single > sitting. > > I''d love to know what it was when someone figures it out though.I can tell you that what''s been changing is the relationship between rspec and T/U. We''re moving towards an interop model where rspec can run "pure" or can co-exist w/ Test::Unit when it is loaded. This will make it easier for us to also support miniunit when it ships w/ Ruby 1.9. My guess is that IntegrationTest, which I believe derives from Test::Unit::TestCase, was implicitly inheriting all of the matchers, but is not any longer due to something that changed under the hood. Since there were no stories or examples of rails stories, nothing broke. We''ll have to add some of those :) Again - I''ll look at this tonight and get it working. Cheers, David> > Daniel > > > On 26 Nov 2007, at 18:27 26 Nov 2007, David Chelimsky wrote: > > > On Nov 26, 2007 11:57 AM, Josh Knowles <joshknowles at gmail.com> wrote: > >> On 11/26/07, Daniel Tenner <daniel.ruby at tenner.org> wrote: > >>> Just seven upped the latest rspec update, and suddenly all my > >>> be_matchers don''t work anymore (they worked just before I updated): > >> > >> <snip /> > >> > >>> Anyone else getting that? > >> > >> All of my controller specs are passing, but my stories are failing > >> with the same error. > >> > >> This works: > >> response.success?.should == true > >> > >> This doesn''t: > >> response.should be_success > > > > Actually I''m surprised these were ever working as RailsStory doesn''t > > include Spec::Matchers - just Spec::Rails::Matchers. The matchers must > > have been making their way in through the back door. > > > > I won''t have time to look at this until tonight, but feel free to > > submit a patch in the mean time if you can figure it out. > > > > Cheers, > > David > > > >> > >> -- > >> Josh Knowles > >> phone: 509-979-1593 > >> email: joshknowles at gmail.com > >> web: http://joshknowles.com > >> > >> _______________________________________________ > >> 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 > > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users >
On 11/26/07, David Chelimsky <dchelimsky at gmail.com> wrote:> Again - I''ll look at this tonight and get it working.http://rspec.lighthouseapp.com/projects/5645-rspec/tickets/147-patch-allow-stories-to-use-spec-matchers -- Josh Knowles phone: 509-979-1593 email: joshknowles at gmail.com web: http://joshknowles.com
On Nov 26, 2007 2:02 PM, Josh Knowles <joshknowles at gmail.com> wrote:> On 11/26/07, David Chelimsky <dchelimsky at gmail.com> wrote: > > Again - I''ll look at this tonight and get it working. > > http://rspec.lighthouseapp.com/projects/5645-rspec/tickets/147-patch-allow-stories-to-use-spec-matchersApplied - thanks Josh! 7-up everyone. Cheers, David> > -- > > Josh Knowles > phone: 509-979-1593 > email: joshknowles at gmail.com > web: http://joshknowles.com > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users >