# Rake features and cucumber feature/name not producing same result

**URL:** <https://www.ruby-forum.com/t/rake-features-and-cucumber-feature-name-not-producing-same-result/152556>\
**Category:** RSpec\
**Created:** [November 5, 2008, 5:00am UTC](https://www.ruby-forum.com/t/rake-features-and-cucumber-feature-name-not-producing-same-result/152556 "2008-11-05T05:00:45Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mikel\_L](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/2bfe46/32.png) [@Mikel\_L](https://www.ruby-forum.com/u/Mikel_L)\
**Post date:** [November 5, 2008, 5:00am UTC](https://www.ruby-forum.com/t/rake-features-and-cucumber-feature-name-not-producing-same-result/152556/1 "2008-11-05T05:00:45Z")

</div>

Hi all.  
If I run rake features or cucumber features/\* I get one failing FIT  
scenario  
in one of my features.

If I then run that feature that contains the FIT table with the failing  
scenario manually, it passes.

I run it again with rake features or cucumber features/\* it fails, run  
individually, it passes.

Obviously some state is carrying over between the features.

Any idea where i would start looking to debug the problem?

Are features transactional? Should I be investigating inter feature  
state  
contamination?

Mikel

---

<div class="post-metadata">

**Author:** ![Mikel\_L](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/2bfe46/32.png) [@Mikel\_L](https://www.ruby-forum.com/u/Mikel_L)\
**Post date:** [November 5, 2008, 9:27am UTC](https://www.ruby-forum.com/t/rake-features-and-cucumber-feature-name-not-producing-same-result/152556/2 "2008-11-05T09:27:31Z")

</div>

On 5 Nov 2008, at 03:58, Mikel L. wrote:

> Obviously some state is carrying over between the features.
> 
> Any idea where i would start looking to debug the problem?
> 
> Are features transactional? Should I be investigating inter feature  
> state contamination?
> 
> Mikel

What is the failure message you’re seeing?

Could it be this?

> **[Lighthouse - Beautifully Simple Issue Tracking](https://lighthouseapp.com/)**

cheers,  
Matt

---

<div class="post-metadata">

**Author:** ![Mikel\_L](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/2bfe46/32.png) [@Mikel\_L](https://www.ruby-forum.com/u/Mikel_L)\
**Post date:** [November 5, 2008, 4:46pm UTC](https://www.ruby-forum.com/t/rake-features-and-cucumber-feature-name-not-producing-same-result/152556/3 "2008-11-05T16:46:06Z")

</div>

On Wed, Nov 5, 2008 at 7:10 PM, Matt W. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> > Are features transactional? Should I be investigating inter feature state  
> > contamination?
> 
> What is the failure message you’re seeing?
> 
> Could it be this?
> 
> [Lighthouse - Beautifully Simple Issue Tracking](http://rspec.lighthouseapp.com/projects/16211/tickets/60-patch-next_column_index-not-resetting-after-large-tables)

Alas no.

I’m getting expected: “1”  
got: “0”

on a simple should change(Model, :count).by(1)

It follows the specific model around as well. If I change order of the  
fit  
table or not (the fit table has 20 rows of different models all being  
exercised the same way, they are part of a replication tool that copies  
a  
database). The only time it passes is when I run the feature  
independently.

I guess I’ll have to look at what the difference is between ( rake  
features  
|| cucumber features/\* ) and cucumber features/specific.feature and try and  
hunt down what beginning state I could be missing.

Any other ideas?

Mikel

---

<div class="post-metadata">

**Author:** ![Mikel\_L](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/2bfe46/32.png) [@Mikel\_L](https://www.ruby-forum.com/u/Mikel_L)\
**Post date:** [November 5, 2008, 5:03pm UTC](https://www.ruby-forum.com/t/rake-features-and-cucumber-feature-name-not-producing-same-result/152556/4 "2008-11-05T17:03:12Z")

</div>

> I guess I’ll have to look at what the difference is between ( rake  
> features || cucumber features/\* ) and cucumber  
> features/specific.feature and try and hunt down what beginning state I  
> could be missing.
> 
> Any other ideas?
> 
> Mikel

Are you running using Webrat or Selenium/Watir?

–  
Joseph W.  
[http://www.joesniff.co.uk](http://www.joesniff.co.uk)

---

<div class="post-metadata">

**Author:** ![Mikel\_L](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/2bfe46/32.png) [@Mikel\_L](https://www.ruby-forum.com/u/Mikel_L)\
**Post date:** [November 7, 2008, 11:19pm UTC](https://www.ruby-forum.com/t/rake-features-and-cucumber-feature-name-not-producing-same-result/152556/5 "2008-11-07T23:19:33Z")

</div>

On Thu, Nov 6, 2008 at 11:28 PM, Joseph W.  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)wrote:

> If you are using cucumber with rails and used the rails generator you  
> should find in your generated features/steps/env.rb file (In the latest  
> cucumber version 0.1.9 this is in features/support/env.rb):

Yes, I was already using the transactional fixtures. This wasn’t the  
problem.

The final problem was actually two code bugs. One on a trigger in the  
database and the other was a namespace confliict in my code.

Those two combined basically had me totally confused 🙂

Mikel

---

<div class="post-metadata">

**Author:** ![Mikel\_L](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/2bfe46/32.png) [@Mikel\_L](https://www.ruby-forum.com/u/Mikel_L)\
**Post date:** [November 5, 2008, 11:55pm UTC](https://www.ruby-forum.com/t/rake-features-and-cucumber-feature-name-not-producing-same-result/152556/6 "2008-11-05T23:55:51Z")

</div>

On Thu, Nov 6, 2008 at 2:53 AM, Joseph W.  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)wrote:

> I’m getting expected: “1”
> 
> > ```
> > got: "0"
> > 
> > ```
> > 
> > on a simple should change(Model, :count).by(1)
> > 
> > It follows the specific model around as well. If I change order of the  
> > fit table or not (the fit table has 20 rows of different models all being  
> > exercised the same way, they are part of a replication tool that copies a  
> > database). The only time it passes is when I run the feature independently.
> > 
> > Are you running using Webrat or Selenium/Watir?

Yes! Running webrat, latest trunk version (as of yesterday anyway).  
Though  
this feature doesn’t use it specifically, webrat is loaded with a  
require  
line in the features/steps/env.rb file.
