@no-txn vs. #Cucumber::Rails.use_transactional_fixtures vs. 0.7.2

110 views
Skip to first unread message

Tim Walker

unread,
May 25, 2010, 3:15:51 PM5/25/10
to cu...@googlegroups.com
Hi,

Sorry if this has come up and I missed it but I just upgraded to
version 0.7.2 and am having trouble with transactions. In my
features/support/env.rb I always just had the
use_transactional_fixtures commented out. Now, I see cucumber wants to
run with transaction wrappers. Tests run fine if I tag them with the
@no-txn tag but I can not get the default to not use transactions
(have tried various flavors of the env.rb). Any help or advice much
appreciated. Please know that the integration domain is very, very
complicated and we use the resultant data state for all kinds of
things so this is important to us despite the atomicity of the
transactions. We long ago wrote our own cleaner.

Many thanks,

Tim

Aslak Hellesøy

unread,
May 25, 2010, 3:37:30 PM5/25/10
to cu...@googlegroups.com, cu...@googlegroups.com
Rails 3?

> --
> You received this message because you are subscribed to the Google
> Groups "Cukes" group.
> To post to this group, send email to cu...@googlegroups.com.
> To unsubscribe from this group, send email to cukes+un...@googlegroups.com
> .
> For more options, visit this group at http://groups.google.com/group/cukes?hl=en
> .
>

Tim Walker

unread,
May 25, 2010, 4:29:16 PM5/25/10
to cu...@googlegroups.com
Rails 2.3.2

Thank you.

Tim

aslak hellesoy

unread,
May 25, 2010, 5:16:13 PM5/25/10
to cu...@googlegroups.com
On Tue, May 25, 2010 at 9:15 PM, Tim Walker <walk...@gmail.com> wrote:
> Hi,
>
> Sorry if this has come up and I missed it but I just upgraded to
> version 0.7.2 and am having trouble with transactions. In my
> features/support/env.rb I always just had the
> use_transactional_fixtures commented out.

I don't know what Rails defaults to if you don't explicitly set it to
true or false.
I recommend you set it explicitly to true or false. (I'm a little
confused about what you want).

> Now, I see cucumber wants to
> run with transaction wrappers. Tests run fine if I tag them with the
> @no-txn tag but I can not get the default to not use transactions
> (have tried various flavors of the env.rb).

If you set
Cucumber::Rails::World.use_transactional_fixtures = true

Then all scenarios will have transactions - *except* the ones you tag
with @no-txn.

If you set
Cucumber::Rails::World.use_transactional_fixtures = false

Then *none* of the scenarios will use transactions - regardless of
whether they are tagged with @no-txn or not.

Can you describe in more detail how you want Cucumber to behave and
what exactly your settings are?
Do you want to turn off transactions across the board? (In which case
@no-txn is unnecessary).

Aslak

> Any help or advice much
> appreciated. Please know that the integration domain is very, very
> complicated and we use the resultant data state for all kinds of
> things so this is important to us despite the atomicity of the
> transactions. We long ago wrote our own cleaner.
>
> Many thanks,
>
> Tim
>

Aslak Hellesøy

unread,
May 25, 2010, 5:23:55 PM5/25/10
to cu...@googlegroups.com, cu...@googlegroups.com

Den 25. mai 2010 kl. 21.15 skrev Tim Walker <walk...@gmail.com>:

> Hi,
>
> Sorry if this has come up and I missed it but I just upgraded to
> version 0.7.2

Did you script/generate cucumber like the upgrading instructions said?

Aslak

> and am having trouble with transactions. In my
> features/support/env.rb I always just had the
> use_transactional_fixtures commented out. Now, I see cucumber wants to
> run with transaction wrappers. Tests run fine if I tag them with the
> @no-txn tag but I can not get the default to not use transactions
> (have tried various flavors of the env.rb). Any help or advice much
> appreciated. Please know that the integration domain is very, very
> complicated and we use the resultant data state for all kinds of
> things so this is important to us despite the atomicity of the
> transactions. We long ago wrote our own cleaner.
>
> Many thanks,
>
> Tim
>

Reply all
Reply to author
Forward
0 new messages