Is there a reason why I cannot access the subject in the before block? It seems to me that anything that I have access to in the it blocks should also be accessible in the before block.
On Mar 31, 2010, at 3:54 PM, Brian Cardarella wrote:> Is there a reason why I cannot access the subject in the before block? > It seems to me that anything that I have access to in the it blocks > should also be accessible in the before block.No reason. You using rspec 1 or 2? Also, before(:each) or before(:all)?
RSpec 1 and before :each On Mar 31, 5:33?pm, David Chelimsky <dchelim... at gmail.com> wrote:> On Mar 31, 2010, at 3:54 PM, Brian Cardarella wrote: > > > Is there a reason why I cannot access the subject in the before block? > > It seems to me that anything that I have access to in the it blocks > > should also be accessible in the before block. > > No reason. You using rspec 1 or 2? Also, before(:each) or before(:all)? > _______________________________________________ > rspec-users mailing list > rspec-us... at rubyforge.orghttp://rubyforge.org/mailman/listinfo/rspec-users
Looks like a bug. Wanna file a report? This is rspec-1, so http://rspec.lighthouseapp.com is fine. Thx On Wed, Mar 31, 2010 at 9:51 PM, Brian Cardarella <bcardarella at gmail.com> wrote:> RSpec 1 and before :each > > On Mar 31, 5:33?pm, David Chelimsky <dchelim... at gmail.com> wrote: >> On Mar 31, 2010, at 3:54 PM, Brian Cardarella wrote: >> >> > Is there a reason why I cannot access the subject in the before block? >> > It seems to me that anything that I have access to in the it blocks >> > should also be accessible in the before block. >> >> No reason. You using rspec 1 or 2? Also, before(:each) or before(:all)? >> _______________________________________________ >> rspec-users mailing list >> rspec-us... at rubyforge.orghttp://rubyforge.org/mailman/listinfo/rspec-users > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users >
So I did some deeper investigation and it seems that it actually is not an issue with the before block but with ''its'' I have an example here: http://github.com/bcardarella/thingy subject is updated in the before block and that update is reflected in ''it'' but not in ''its'' I also opened a Lighthouse ticket for this - Brian On Apr 1, 8:57?am, David Chelimsky <dchelim... at gmail.com> wrote:> Looks like a bug. Wanna file a report? This is rspec-1, sohttp://rspec.lighthouseapp.comis fine. > > Thx > > > > > > On Wed, Mar 31, 2010 at 9:51 PM, Brian Cardarella <bcardare... at gmail.com> wrote: > > RSpec 1 and before :each > > > On Mar 31, 5:33?pm, David Chelimsky <dchelim... at gmail.com> wrote: > >> On Mar 31, 2010, at 3:54 PM, Brian Cardarella wrote: > > >> > Is there a reason why I cannot access the subject in the before block? > >> > It seems to me that anything that I have access to in the it blocks > >> > should also be accessible in the before block. > > >> No reason. You using rspec 1 or 2? Also, before(:each) or before(:all)? > >> _______________________________________________ > >> rspec-users mailing list > >> rspec-us... at rubyforge.orghttp://rubyforge.org/mailman/listinfo/rspec-users > > _______________________________________________ > > rspec-users mailing list > > rspec-us... at rubyforge.org > >http://rubyforge.org/mailman/listinfo/rspec-users > > _______________________________________________ > rspec-users mailing list > rspec-us... at rubyforge.orghttp://rubyforge.org/mailman/listinfo/rspec-users
On Apr 1, 2010, at 9:56 AM, Brian Cardarella wrote:> So I did some deeper investigation and it seems that it actually is > not an issue with the before block but with ''its'' > > I have an example here: > > http://github.com/bcardarella/thingy > > subject is updated in the before block and that update is reflected in > ''it'' but not in ''its'' > > I also opened a Lighthouse ticket for thisCool. Thanks.> > - Brian > > > On Apr 1, 8:57 am, David Chelimsky <dchelim... at gmail.com> wrote: >> Looks like a bug. Wanna file a report? This is rspec-1, sohttp://rspec.lighthouseapp.comis fine. >> >> Thx >> >> >> >> >> >> On Wed, Mar 31, 2010 at 9:51 PM, Brian Cardarella <bcardare... at gmail.com> wrote: >>> RSpec 1 and before :each >> >>> On Mar 31, 5:33 pm, David Chelimsky <dchelim... at gmail.com> wrote: >>>> On Mar 31, 2010, at 3:54 PM, Brian Cardarella wrote: >> >>>>> Is there a reason why I cannot access the subject in the before block? >>>>> It seems to me that anything that I have access to in the it blocks >>>>> should also be accessible in the before block. >> >>>> No reason. You using rspec 1 or 2? Also, before(:each) or before(:all)? >>>> _______________________________________________ >>>> rspec-users mailing list >>>> rspec-us... at rubyforge.orghttp://rubyforge.org/mailman/listinfo/rspec-users >>> _______________________________________________ >>> rspec-users mailing list >>> rspec-us... at rubyforge.org >>> http://rubyforge.org/mailman/listinfo/rspec-users >> >> _______________________________________________ >> rspec-users mailing list >> rspec-us... at rubyforge.orghttp://rubyforge.org/mailman/listinfo/rspec-users > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users