Brian Cardarella
2010-Jun-05 17:42 UTC
[rspec-users] Should I be using database_cleaner to tear down data in RSpec 2.0 + Rails 3.0?
Subject pretty much asks the question
David Chelimsky
2010-Jun-05 18:12 UTC
[rspec-users] Should I be using database_cleaner to tear down data in RSpec 2.0 + Rails 3.0?
On Jun 5, 2010, at 12:42 PM, Brian Cardarella wrote:> Subject pretty much asks the questionYou _can_, but if you use ActiveRecord and start off with a clean DB, you can use_transactional_examples (alias for use_transactional_fixtures, which defaults to true in beta.10, but will default to false in beta.11).
Brian Cardarella
2010-Jun-05 19:34 UTC
[rspec-users] Should I be using database_cleaner to tear down data in RSpec 2.0 + Rails 3.0?
David, I''m not seeing that behavior. I have beta.10 and without using database_cleaner data is persisting after each spec and from suite run to suite run. I thought database_cleaner would resolve the issue but it doesn''t seem to. - Bran On Jun 5, 2:12?pm, David Chelimsky <dchelim... at gmail.com> wrote:> On Jun 5, 2010, at 12:42 PM, Brian Cardarella wrote: > > > Subject pretty much asks the question > > You _can_, but if you use ActiveRecord and start off with a clean DB, you can use_transactional_examples (alias for use_transactional_fixtures, which defaults to true in beta.10, but will default to false in beta.11). > _______________________________________________ > rspec-users mailing list > rspec-us... at rubyforge.orghttp://rubyforge.org/mailman/listinfo/rspec-users
David Chelimsky
2010-Jun-05 19:42 UTC
[rspec-users] Should I be using database_cleaner to tear down data in RSpec 2.0 + Rails 3.0?
On Jun 5, 2010, at 3:34 PM, Brian Cardarella wrote:> On Jun 5, 2:12 pm, David Chelimsky <dchelim... at gmail.com> wrote: >> On Jun 5, 2010, at 12:42 PM, Brian Cardarella wrote: >> >>> Subject pretty much asks the question >> >> You _can_, but if you use ActiveRecord and start off with a clean DB, you can use_transactional_examples (alias for use_transactional_fixtures, which defaults to true in beta.10, but will default to false in beta.11). > David, > > I''m not seeing that behavior. > > I have beta.10 and without using database_cleaner data is persisting > after each spec and from suite run to suite run. I thought > database_cleaner would resolve the issue but it doesn''t seem to.I _am_ seeing that behaviour :) Are you using AR? What does your spec_helper look like? This cucumber feature passes: http://github.com/rspec/rspec-rails/blob/master/features/model_specs/transactional_examples.feature Not sure what''s up, but there is something different about your environment.
Brian Cardarella
2010-Jun-05 20:11 UTC
[rspec-users] Should I be using database_cleaner to tear down data in RSpec 2.0 + Rails 3.0?
Yeah, I''m not certain what the deal is. Here is my spec_helper: http://pastie.org/993256 I was using Spork but commented it out to see if that was an issue. Nope. I was using sqlite to see if the lack of a real transactional database was the issue. (changed to postgres) Nope. Not certain if this is of any help but here is my Gemfile: http://pastie.org/993259 (it''s a mess, I know) This is confusing. :p - Brian On Jun 5, 3:42?pm, David Chelimsky <dchelim... at gmail.com> wrote:> On Jun 5, 2010, at 3:34 PM, Brian Cardarella wrote: > > > On Jun 5, 2:12 pm, David Chelimsky <dchelim... at gmail.com> wrote: > >> On Jun 5, 2010, at 12:42 PM, Brian Cardarella wrote: > > >>> Subject pretty much asks the question > > >> You _can_, but if you use ActiveRecord and start off with a clean DB, you can use_transactional_examples (alias for use_transactional_fixtures, which defaults to true in beta.10, but will default to false in beta.11). > > David, > > > I''m not seeing that behavior. > > > I have beta.10 and without using database_cleaner data is persisting > > after each spec and from suite run to suite run. I thought > > database_cleaner would resolve the issue but it doesn''t seem to. > > I _am_ seeing that behaviour :) > > Are you using AR? What does your spec_helper look like? > > This cucumber feature passes: > > http://github.com/rspec/rspec-rails/blob/master/features/model_specs/... > > Not sure what''s up, but there is something different about your environment. > > _______________________________________________ > rspec-users mailing list > rspec-us... at rubyforge.orghttp://rubyforge.org/mailman/listinfo/rspec-users
Brian Cardarella
2010-Jun-05 20:12 UTC
[rspec-users] Should I be using database_cleaner to tear down data in RSpec 2.0 + Rails 3.0?
Sorry, forgot to answer the other question. I am using ActiveRecord. Just a greenfield Rails 3.0.0.beta3 app - Brian On Jun 5, 3:42?pm, David Chelimsky <dchelim... at gmail.com> wrote:> On Jun 5, 2010, at 3:34 PM, Brian Cardarella wrote: > > > On Jun 5, 2:12 pm, David Chelimsky <dchelim... at gmail.com> wrote: > >> On Jun 5, 2010, at 12:42 PM, Brian Cardarella wrote: > > >>> Subject pretty much asks the question > > >> You _can_, but if you use ActiveRecord and start off with a clean DB, you can use_transactional_examples (alias for use_transactional_fixtures, which defaults to true in beta.10, but will default to false in beta.11). > > David, > > > I''m not seeing that behavior. > > > I have beta.10 and without using database_cleaner data is persisting > > after each spec and from suite run to suite run. I thought > > database_cleaner would resolve the issue but it doesn''t seem to. > > I _am_ seeing that behaviour :) > > Are you using AR? What does your spec_helper look like? > > This cucumber feature passes: > > http://github.com/rspec/rspec-rails/blob/master/features/model_specs/... > > Not sure what''s up, but there is something different about your environment. > > _______________________________________________ > rspec-users mailing list > rspec-us... at rubyforge.orghttp://rubyforge.org/mailman/listinfo/rspec-users
Brian Cardarella
2010-Jun-05 20:20 UTC
[rspec-users] Should I be using database_cleaner to tear down data in RSpec 2.0 + Rails 3.0?
Ok, something else is going on because I just generated a brand new app with rspec-2.0.beta.10 and the transactions are working just fine. Sorry about that, I''ll track down the issue. - Brian On Jun 5, 4:12?pm, Brian Cardarella <bcardare... at gmail.com> wrote:> Sorry, forgot to answer the other question. I am using ActiveRecord. > Just a greenfield Rails 3.0.0.beta3 app > > - Brian > > On Jun 5, 3:42?pm, David Chelimsky <dchelim... at gmail.com> wrote: > > > > > On Jun 5, 2010, at 3:34 PM, Brian Cardarella wrote: > > > > On Jun 5, 2:12 pm, David Chelimsky <dchelim... at gmail.com> wrote: > > >> On Jun 5, 2010, at 12:42 PM, Brian Cardarella wrote: > > > >>> Subject pretty much asks the question > > > >> You _can_, but if you use ActiveRecord and start off with a clean DB, you can use_transactional_examples (alias for use_transactional_fixtures, which defaults to true in beta.10, but will default to false in beta.11). > > > David, > > > > I''m not seeing that behavior. > > > > I have beta.10 and without using database_cleaner data is persisting > > > after each spec and from suite run to suite run. I thought > > > database_cleaner would resolve the issue but it doesn''t seem to. > > > I _am_ seeing that behaviour :) > > > Are you using AR? What does your spec_helper look like? > > > This cucumber feature passes: > > >http://github.com/rspec/rspec-rails/blob/master/features/model_specs/... > > > Not sure what''s up, but there is something different about your environment. > > > _______________________________________________ > > rspec-users mailing list > > rspec-us... at rubyforge.orghttp://rubyforge.org/mailman/listinfo/rspec-users > > _______________________________________________ > rspec-users mailing list > rspec-us... at rubyforge.orghttp://rubyforge.org/mailman/listinfo/rspec-users
David Chelimsky
2010-Jun-05 20:21 UTC
[rspec-users] Should I be using database_cleaner to tear down data in RSpec 2.0 + Rails 3.0?
On Jun 5, 2010, at 4:11 PM, Brian Cardarella wrote:> Yeah, I''m not certain what the deal is. > > Here is my spec_helper: http://pastie.org/993256 > > I was using Spork but commented it out to see if that was an issue. > Nope. > I was using sqlite to see if the lack of a real transactional database > was the issue. (changed to postgres) Nope. > > Not certain if this is of any help but here is my Gemfile: http://pastie.org/993259I see two rspec-rails references in your Gemfile - not sure if that''s the issue, but it could be.> (it''s a mess, I know) > > This is confusing. :p > > - Brian > > On Jun 5, 3:42 pm, David Chelimsky <dchelim... at gmail.com> wrote: >> On Jun 5, 2010, at 3:34 PM, Brian Cardarella wrote: >> >>> On Jun 5, 2:12 pm, David Chelimsky <dchelim... at gmail.com> wrote: >>>> On Jun 5, 2010, at 12:42 PM, Brian Cardarella wrote: >> >>>>> Subject pretty much asks the question >> >>>> You _can_, but if you use ActiveRecord and start off with a clean DB, you can use_transactional_examples (alias for use_transactional_fixtures, which defaults to true in beta.10, but will default to false in beta.11). >>> David, >> >>> I''m not seeing that behavior. >> >>> I have beta.10 and without using database_cleaner data is persisting >>> after each spec and from suite run to suite run. I thought >>> database_cleaner would resolve the issue but it doesn''t seem to. >> >> I _am_ seeing that behaviour :) >> >> Are you using AR? What does your spec_helper look like? >> >> This cucumber feature passes: >> >> http://github.com/rspec/rspec-rails/blob/master/features/model_specs/... >> >> Not sure what''s up, but there is something different about your environment. >> >> _______________________________________________ >> 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
Brian Cardarella
2010-Jun-05 21:06 UTC
[rspec-users] Should I be using database_cleaner to tear down data in RSpec 2.0 + Rails 3.0?
Okay, it''s going to be one of those weekends. I forgot to wrap the example in an ''it'' block. It was just a bare ''context'' block running the code. False alarm! :D - Brian On Jun 5, 4:21?pm, David Chelimsky <dchelim... at gmail.com> wrote:> On Jun 5, 2010, at 4:11 PM, Brian Cardarella wrote: > > > Yeah, I''m not certain what the deal is. > > > Here is my spec_helper:http://pastie.org/993256 > > > I was using Spork but commented it out to see if that was an issue. > > Nope. > > I was using sqlite to see if the lack of a real transactional database > > was the issue. (changed to postgres) Nope. > > > Not certain if this is of any help but here is my Gemfile:http://pastie.org/993259 > > I see two rspec-rails references in your Gemfile - not sure if that''s the issue, but it could be. > > > > > > > (it''s a mess, I know) > > > This is confusing. :p > > > - Brian > > > On Jun 5, 3:42 pm, David Chelimsky <dchelim... at gmail.com> wrote: > >> On Jun 5, 2010, at 3:34 PM, Brian Cardarella wrote: > > >>> On Jun 5, 2:12 pm, David Chelimsky <dchelim... at gmail.com> wrote: > >>>> On Jun 5, 2010, at 12:42 PM, Brian Cardarella wrote: > > >>>>> Subject pretty much asks the question > > >>>> You _can_, but if you use ActiveRecord and start off with a clean DB, you can use_transactional_examples (alias for use_transactional_fixtures, which defaults to true in beta.10, but will default to false in beta.11). > >>> David, > > >>> I''m not seeing that behavior. > > >>> I have beta.10 and without using database_cleaner data is persisting > >>> after each spec and from suite run to suite run. I thought > >>> database_cleaner would resolve the issue but it doesn''t seem to. > > >> I _am_ seeing that behaviour :) > > >> Are you using AR? What does your spec_helper look like? > > >> This cucumber feature passes: > > >>http://github.com/rspec/rspec-rails/blob/master/features/model_specs/... > > >> Not sure what''s up, but there is something different about your environment. > > >> _______________________________________________ > >> 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
David Chelimsky
2010-Jun-05 21:17 UTC
[rspec-users] Should I be using database_cleaner to tear down data in RSpec 2.0 + Rails 3.0?
On Jun 5, 2010, at 4:20 PM, Brian Cardarella wrote:> Ok, something else is going on because I just generated a brand new > app with rspec-2.0.beta.10 and the transactions are working just fine. > Sorry about that, I''ll track down the issue.Happens :) Good luck.> > - Brian > > On Jun 5, 4:12 pm, Brian Cardarella <bcardare... at gmail.com> wrote: >> Sorry, forgot to answer the other question. I am using ActiveRecord. >> Just a greenfield Rails 3.0.0.beta3 app >> >> - Brian >> >> On Jun 5, 3:42 pm, David Chelimsky <dchelim... at gmail.com> wrote: >> >> >> >>> On Jun 5, 2010, at 3:34 PM, Brian Cardarella wrote: >> >>>> On Jun 5, 2:12 pm, David Chelimsky <dchelim... at gmail.com> wrote: >>>>> On Jun 5, 2010, at 12:42 PM, Brian Cardarella wrote: >> >>>>>> Subject pretty much asks the question >> >>>>> You _can_, but if you use ActiveRecord and start off with a clean DB, you can use_transactional_examples (alias for use_transactional_fixtures, which defaults to true in beta.10, but will default to false in beta.11). >>>> David, >> >>>> I''m not seeing that behavior. >> >>>> I have beta.10 and without using database_cleaner data is persisting >>>> after each spec and from suite run to suite run. I thought >>>> database_cleaner would resolve the issue but it doesn''t seem to. >> >>> I _am_ seeing that behaviour :) >> >>> Are you using AR? What does your spec_helper look like? >> >>> This cucumber feature passes: >> >>> http://github.com/rspec/rspec-rails/blob/master/features/model_specs/... >> >>> Not sure what''s up, but there is something different about your environment. >> >>> _______________________________________________ >>> rspec-users mailing list >>> rspec-us... at rubyforge.orghttp://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