Am I missing something with Heckle?

Hi

I can’t get heckle working. In fact, I’ve built an example so simple
that it either shows a bug, or I am being really, REALLY stupid.

Heckle does not appear to support RSpec directly, so I’m trying to use
spec --heckle (RSpec trunk as of 10 mins ago, Heckle 1.4.1). I’ve
constructed this pair of sample files:

18> ~/Desktop/heckle_test % cat lib/cow.rb
class Cow
def moo
“moo”
end
end

19> ~/Desktop/heckle_test % cat spec/cow_spec.rb
require ‘rubygems’
require ‘spec’

require File.dirname(FILE) + ‘/…/lib/cow.rb’

describe Cow do
it “should moo when sent :moo” do
cow = Cow.new
# cow.moo.should == “moo”
end
end

So, my thinking is, the spec should pass (nothing in the one example
to make it fail). Then heckle should change “moo” to “dfhgd5rgvsev”
or some other randomness, then it should expect “Cow should moo when
sent :moo” to fail, which of course it won’t, because I commented
out the line that checks that.

Also, if I manually violate the example, spec proceeds to heckle anyway:

25> ~/Desktop/heckle_test % spec --heckle Cow spec/cow_spec.rb
F

‘Cow should moo when sent :moo’ FAILED
./spec/cow_spec.rb:9:

Finished in 0.00767 seconds

1 example, 1 failure


*** Cow#moo loaded with 1 possible mutations


1 mutations remaining…
No mutants survived. Cool!

What’s going on? None of this is behaviour I expect.

Ashley


blog @ http://aviewfromafar.net/
linked-in @ http://www.linkedin.com/in/ashleymoran
currently @ home

On Oct 30, 2007 7:05 PM, Ashley M. [email protected] wrote:

Hi

I can’t get heckle working. In fact, I’ve built an example so simple
that it either shows a bug, or I am being really, REALLY stupid.

Heckle is hosed in trunk. We’ll get it fixed before the release. Of
course, that means the release won’t be as soon as we hoped :frowning:

On Oct 31, 2007 6:28 AM, David C. [email protected] wrote:

On Oct 30, 2007 7:05 PM, Ashley M. [email protected] wrote:

Hi

I can’t get heckle working. In fact, I’ve built an example so simple
that it either shows a bug, or I am being really, REALLY stupid.

Heckle is hosed in trunk. We’ll get it fixed before the release.

Fixed in r2803.

http://rubyforge.org/tracker/index.php?func=detail&aid=15232&group_id=797&atid=3149

On Oct 31, 2007, at 7:28 AM, David C. wrote:

[email protected]
http://rubyforge.org/mailman/listinfo/rspec-users

When can we expect the next release of rspec?

Scott

On Oct 31, 2007 1:50 PM, Ashley M. [email protected] wrote:

spec command is 0, even if heckling finds an unspecced path.

Are these issues easy to solve? Should I file tickets for them?

Tickets would be awesome. Please reference the revision number you’re
working from.

Thanks Ashley.

Cheers,
David

On Oct 31, 2007, at 12:15 pm, David C. wrote:

Fixed in r2803.

Excellent, thanks! However it still runs heckle even if the specs
fail (and then assumes that the heckling is successful, because of the
failing spec).

Also I notice that, as long as the specs pass, the return code for the
spec command is 0, even if heckling finds an unspecced path.

Are these issues easy to solve? Should I file tickets for them?

Ashley


blog @ http://aviewfromafar.net/
linked-in @ http://www.linkedin.com/in/ashleymoran
currently @ home

On Oct 31, 2007, at 4:36 pm, Scott T. wrote:

When can we expect the next release of rspec?

You wait for releases? :slight_smile:


blog @ http://aviewfromafar.net/
linked-in @ http://www.linkedin.com/in/ashleymoran
currently @ home

On Oct 31, 2007, at 6:53 pm, David C. wrote:

Tickets would be awesome. Please reference the revision number you’re
working from.

Sure thing - they’ve gone up as two separate issues

So by the time RSpec 1.2 comes out, and specs, stories, rcov and
heckle are all working seamlessly, there’s nothing to stop me writing
perfect code… right?

Cheers
Ashley


blog @ http://aviewfromafar.net/
linked-in @ http://www.linkedin.com/in/ashleymoran
currently @ home

On Oct 31, 2007 3:48 PM, Ashley M. [email protected] wrote:

perfect code… right?
If you think having the right tools will make you right perfect code …

On Oct 31, 2007, at 2:50 PM, Ashley M. wrote:

On Oct 31, 2007, at 4:36 pm, Scott T. wrote:

When can we expect the next release of rspec?

You wait for releases? :slight_smile:

No, we are running on trunk, but have had a number of frustrating
days. I’m the one who advocates rspec, and when running on trunk
starts bothering my co-workers, it makes me look bad. I’d like to
get to a stable version, but currently I’m using mock_model
with :null_object => true, which is only on trunk. Moving to 1.0.8
would break those specs.

Scott

On Oct 31, 2007 3:56 PM, Ashley M. [email protected] wrote:

I’d like to get to a stable version, but currently I’m using
mock_model
with :null_object => true, which is only on trunk. Moving to 1.0.8
would break those specs.

Kinda assumes RSpec will stabilise some time soon? For me, there’s
too much good stuff going in to use the last release. Will there ever
be a stage where RSpec is “complete”?

Hopefully not :slight_smile:

But we do plan to position ourselves to release more frequently than
this recent gap.

Cheers,
David

On Oct 31, 2007, at 8:52 pm, David C. wrote:

If you think having the right tools will make you right perfect
code …

Nope, they won’t make me… but if I’m trying, and the tools both
facilitate the effort and tell me when I mess up, surely that goes a
very long way?

I mean, I could write perfect code with nothing but ruby and nano, but
I’d have to be some kind of supergenius. I just want something to
make up for the fact I’m human. It’s like leaving things you need to
take to work next to your car keys.


blog @ http://aviewfromafar.net/
linked-in @ http://www.linkedin.com/in/ashleymoran
currently @ home

On Oct 31, 2007, at 6:58 pm, Scott T. wrote:

No, we are running on trunk, but have had a number of frustrating
days. I’m the one who advocates rspec, and when running on trunk
starts bothering my co-workers, it makes me look bad.

Ah, I know where you are coming from. Shame no-one else there is
bitten yet, it’s hard being the sole advocate for something. They
must either not see the benefits, or not care. I hope it’s the former.

I’d like to get to a stable version, but currently I’m using
mock_model
with :null_object => true, which is only on trunk. Moving to 1.0.8
would break those specs.

Kinda assumes RSpec will stabilise some time soon? For me, there’s
too much good stuff going in to use the last release. Will there ever
be a stage where RSpec is “complete”?

Ashley


blog @ http://aviewfromafar.net/
linked-in @ http://www.linkedin.com/in/ashleymoran
currently @ home

You too!

El 31/10/2007, a las 15:40, “David C.” [email protected]
escribió:

On Oct 30, 2007 7:05 PM, Ashley M. [email protected] wrote:

Hi

I can’t get heckle working. In fact, I’ve built an example so simple
that it either shows a bug, or I am being really, REALLY stupid.

Heckle is hosed in trunk. We’ll get it fixed before the release. Of
course, that means the release won’t be as soon as we hoped :frowning:

Recently with all of the activity on the story runner front I’ve
thought that RSpec could benefit from a slightly more “branched”
development process. At the moment it appears that all development
activity occurs on the trunk, which means that when there are long
periods between releases you have no choice but to live with the old
version or sit on the bleeding edge.

If RSpec had a “development” and “maintenance” branch (or “stable” and
“devel”; “master” and “maint”; call them what you will) then it would
be easier to contemplate intermediate maintenance releases while
working on big new features which take a long time to get “baked in”,
like the story runner.

As an example, consider how the Rails 2.0 preview release came out and
the trunk wasn’t really ready to have a release cut from it for
compatibility, so people have had to follow the trunk. It would have
been nice to be able to cut a 1.0.9 release from a maintenance branch
instead.

If the suckiness of Subversion’s merge functionality is a problem then
RSpec should consider moving to a different SCM, or at least layering
one on top of the existing Subversion repo (ie. “the” Subversion repo
continues to be the centralized distribution point, but the devs do
the “real work” using Git).

Cheers,
Wincent

On Oct 31, 2007 9:56 AM, Wincent C. [email protected] wrote:

be easier to contemplate intermediate maintenance releases while
RSpec should consider moving to a different SCM, or at least layering
one on top of the existing Subversion repo (ie. “the” Subversion repo
continues to be the centralized distribution point, but the devs do
the “real work” using Git).

Please start new conversations with a new subject. This is unrelated
to the heckle problem and deserves a thread of its own.

I responded (in a new thread) on the rspec-devel list, which is the
appropriate home for discussions about dev process:

http://rubyforge.org/pipermail/rspec-devel/2007-October/004194.html

Cheers,
David

On Oct 31, 2007 4:20 PM, Ashley M. [email protected] wrote:

It’s like leaving things you need to take to work next to your car keys.

If only I could remember where I put the damned car keys!