Would it be desirable to have before and after take a spec name as well as :each and :all? Scott
On 5/3/07, Scott Taylor <mailing_lists at railsnewbie.com> wrote:> > Would it be desirable to have before and after take a spec name as > well as :each and :all?What do YOU think?> > Scott > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users >
Having custom before statements might reduce readability a bit - I would argue that if you have many "it" statements that share a common setup, they probably deserve a separate context (a different known state). The shared context makes it possible to reduce duplication that might otherwise come from splitting up contexts, and basically does the same thing as custom before statements would do - only it keeps each context a little more atomic - IMO On 5/3/07, David Chelimsky <dchelimsky at gmail.com> wrote:> > On 5/3/07, Scott Taylor <mailing_lists at railsnewbie.com> wrote: > > > > Would it be desirable to have before and after take a spec name as > > well as :each and :all? > > What do YOU think? > > > > > Scott > > _______________________________________________ > > 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 >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/rspec-users/attachments/20070503/4f7cebf1/attachment.html
On 5/3/07, Jeff Dean <jeff at jefdean.com> wrote:> Having custom before statements might reduce readability a bit - I would > argue that if you have many "it" statements that share a common setup, they > probably deserve a separate context (a different known state). The shared > context makes it possible to reduce duplication that might otherwise come > from splitting up contexts, and basically does the same thing as custom > before statements would do - only it keeps each context a little more atomic > - IMOScott - I would agree w/ Jeff here, but I am interested to know what you had in my mind.> > > On 5/3/07, David Chelimsky <dchelimsky at gmail.com> wrote: > > On 5/3/07, Scott Taylor <mailing_lists at railsnewbie.com> wrote: > > > > > > Would it be desirable to have before and after take a spec name as > > > well as :each and :all? > > > > What do YOU think? > > > > > > > > Scott > > > _______________________________________________ > > > 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 >
Has anyone gotten CC to use rSpec as a builder? There was some comment on their list about this in February, but I wondered if anyone here is using CC (or is there some other ci tool that might be more suitable)? Thx
I didn''t have any troubles to get it working at all, I just created a Rakefile with a custom ''cruise'' task: require ''rake'' require ''spec/rake/spectask'' task :cruise do Rake::Task["spec"].invoke end Spec::Rake::SpecTask.new do |t| t.spec_opts = [''-f s''] t.spec_files = ''SMSer_spec.rb'' end What problems are you running into, or are you talking about a Rails project? On 5/3/07, s. ross <cwdinfo at gmail.com> wrote:> Has anyone gotten CC to use rSpec as a builder? There was some > comment on their list about this in February, but I wondered if > anyone here is using CC (or is there some other ci tool that might be > more suitable)? > > Thx > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users >
It''s Rails. I''m running the plugin version of rSpec but using cc invokes the gem version giving me a version mismatch. Any thoughts? Thx On May 3, 2007, at 9:45 AM, Matthijs Langenberg wrote:> I didn''t have any troubles to get it working at all, I just created a > Rakefile with a custom ''cruise'' task: > > require ''rake'' > require ''spec/rake/spectask'' > > task :cruise do > Rake::Task["spec"].invoke > end > > Spec::Rake::SpecTask.new do |t| > t.spec_opts = [''-f s''] > t.spec_files = ''SMSer_spec.rb'' > end > > What problems are you running into, or are you talking about a > Rails project? > > On 5/3/07, s. ross <cwdinfo at gmail.com> wrote: >> Has anyone gotten CC to use rSpec as a builder? There was some >> comment on their list about this in February, but I wondered if >> anyone here is using CC (or is there some other ci tool that might be >> more suitable)? >> >> Thx >> _______________________________________________ >> 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
I''ll answer my own question. This seems to work ok: require File.join(RAILS_ROOT, ''/vendor/plugins/rspec/lib/spec/rake/ spectask'') task :cruise do Rake::Task["cruise_spec"].invoke end Spec::Rake::SpecTask.new(:cruise_spec) do |t| t.spec_opts = [''--options'', "\"#{RAILS_ROOT}/spec/spec.opts\""] t.spec_files = FileList[''spec/**/*_spec.rb''] end The formatting isn''t great, but it succeeds when it should and fails when a bad checkin is made. On May 3, 2007, at 9:45 AM, Matthijs Langenberg wrote:> I didn''t have any troubles to get it working at all, I just created a > Rakefile with a custom ''cruise'' task: > > require ''rake'' > require ''spec/rake/spectask'' > > task :cruise do > Rake::Task["spec"].invoke > end > > Spec::Rake::SpecTask.new do |t| > t.spec_opts = [''-f s''] > t.spec_files = ''SMSer_spec.rb'' > end > > What problems are you running into, or are you talking about a > Rails project? > > On 5/3/07, s. ross <cwdinfo at gmail.com> wrote: >> Has anyone gotten CC to use rSpec as a builder? There was some >> comment on their list about this in February, but I wondered if >> anyone here is using CC (or is there some other ci tool that might be >> more suitable)? >> >> Thx >> _______________________________________________ >> 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